diff options
author | Joey Hess <joey@kitenet.net> | 2014-07-25 17:29:59 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-07-25 17:29:59 -0400 |
commit | 4c359d354231d2a1972307469d278e2fcb3fe0f0 (patch) | |
tree | 54524077c58d52fc940afd1c37d35afe1b1eaf95 /Remote | |
parent | 956807053d627355157f1df51667b2a61f57ab60 (diff) |
Fix cost calculation for non-encrypted remotes.
Encyptable types of remotes that were not actually encrypted still had
the encryptedRemoteCostAdj applied to their configured cost, which was a
bug.
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/Helper/Encryptable.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index a6e79ddc4..41174cf7c 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -87,7 +87,10 @@ encryptableRemote c storeKeyEncrypted retrieveKeyFileEncrypted r = retrieveKeyFileCheap = retrieveCheap, removeKey = withkey $ removeKey r, hasKey = withkey $ hasKey r, - cost = cost r + encryptedRemoteCostAdj + cost = maybe + (cost r) + (const $ cost r + encryptedRemoteCostAdj) + (extractCipher c) } where store k f p = cip k >>= maybe |