inherit other fields

I think this is all that need to be inherited.
This commit is contained in:
Joey Hess 2019-10-10 16:10:12 -04:00
parent c3975ff3b4
commit df5b0ffab3
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
4 changed files with 40 additions and 13 deletions

View file

@ -25,6 +25,7 @@ import Logs.Chunk
import Utility.Metered
import Crypto (EncKey)
import Backend (isStableKey)
import Annex.SpecialRemote.Config
import qualified Data.ByteString.Lazy as L
import qualified Data.Map as M
@ -49,11 +50,11 @@ noChunks _ = False
getChunkConfig :: RemoteConfig -> ChunkConfig
getChunkConfig m =
case M.lookup "chunksize" m of
case M.lookup chunksizeField m of
Nothing -> case M.lookup "chunk" m of
Nothing -> NoChunks
Just v -> readsz UnpaddedChunks v "chunk"
Just v -> readsz LegacyChunks v "chunksize"
Just v -> readsz LegacyChunks v chunksizeField
where
readsz c v f = case readSize dataUnits v of
Just size