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.
This commit is contained in:
parent
014794f4ed
commit
005aded3e0
2 changed files with 5 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue