diff options
author | Joey Hess <joey@kitenet.net> | 2012-01-20 13:23:11 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-01-20 13:23:11 -0400 |
commit | 61dbad505d648f13394018c31ce2d718c175007e (patch) | |
tree | 96f087d5ec3e3eab6cf45b5a7d49cfb2b0dfa7f7 /Remote/Helper | |
parent | e96726caa31fd76413b450790860611f71d13915 (diff) |
fsck --from remote --fast
Avoids expensive file transfers, at the expense of checking file size
and/or contents.
Required some reworking of the remote code.
Diffstat (limited to 'Remote/Helper')
-rw-r--r-- | Remote/Helper/Encryptable.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index ad99c3092..0569cb555 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -47,6 +47,7 @@ encryptableRemote c storeKeyEncrypted retrieveKeyFileEncrypted r = r { storeKey = store, retrieveKeyFile = retrieve, + retrieveKeyFileCheap = retrieveCheap, removeKey = withkey $ removeKey r, hasKey = withkey $ hasKey r, cost = cost r + encryptedRemoteCostAdj @@ -55,9 +56,12 @@ encryptableRemote c storeKeyEncrypted retrieveKeyFileEncrypted r = store k = cip k >>= maybe (storeKey r k) (`storeKeyEncrypted` k) - retrieve k t f = cip k >>= maybe - (retrieveKeyFile r k t f) + retrieve k f = cip k >>= maybe + (retrieveKeyFile r k f) (`retrieveKeyFileEncrypted` f) + retrieveCheap k f = cip k >>= maybe + (retrieveKeyFileCheap r k f) + (\_ -> return False) withkey a k = cip k >>= maybe (a k) (a . snd) cip = cipherKey c |