From a6b6666c488f37e2e02ca0ec151283e0a41c5631 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 30 Jul 2014 10:34:39 -0400 Subject: 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. --- Remote/Helper/Chunked.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'Remote/Helper/Chunked.hs') diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs index d9ab3c3e6..fcfe06b20 100644 --- a/Remote/Helper/Chunked.hs +++ b/Remote/Helper/Chunked.hs @@ -23,6 +23,7 @@ import Types.Key import Logs.Chunk import Utility.Metered import Crypto (EncKey) +import Backend (isStableKey) import Annex.Exception import qualified Data.ByteString.Lazy as L @@ -95,7 +96,7 @@ storeChunks -> Annex Bool storeChunks u chunkconfig k f p storer checker = case chunkconfig of - (UnpaddedChunks chunksize) -> + (UnpaddedChunks chunksize) | isStableKey k -> bracketIO open close (go chunksize) _ -> showprogress $ storer k (FileContent f) where -- cgit v1.2.3