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:
Joey Hess 2014-07-25 17:29:59 -04:00
parent 014794f4ed
commit 005aded3e0
2 changed files with 5 additions and 1 deletions

View file

@ -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

1
debian/changelog vendored
View file

@ -6,6 +6,7 @@ git-annex (5.20140718) UNRELEASED; urgency=medium
unreachable objects, but some branches no longer accessible.
Fix this, including support for fixing up repositories that
were incompletely repaired before.
* Fix cost calculation for non-encrypted remotes.
-- Joey Hess <joeyh@debian.org> Mon, 21 Jul 2014 14:41:26 -0400