only chunk stable keys

The content of unstable keys can potentially be different in different
repos, so eg, resuming a chunked upload started by another repo would
corrupt data.
This commit is contained in:
Joey Hess 2014-07-30 10:34:39 -04:00
parent a963d790d3
commit 89416ba2d9
2 changed files with 5 additions and 4 deletions

View file

@ -15,7 +15,7 @@ module Backend (
chooseBackend,
lookupBackendName,
maybeLookupBackendName,
checkStableKey,
isStableKey,
) where
import Common.Annex
@ -126,6 +126,6 @@ maybeLookupBackendName s = M.lookup s nameMap
nameMap :: M.Map String Backend
nameMap = M.fromList $ zip (map B.name list) list
checkStableKey :: Key -> Bool
checkStableKey k = maybe False (`B.isStableKey` k)
isStableKey :: Key -> Bool
isStableKey k = maybe False (`B.isStableKey` k)
(maybeLookupBackendName (keyBackendName k))