From 8f142a92795dc73d17d335df4e168169d45eb154 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 14 Jan 2020 13:05:38 -0400 Subject: [PATCH] fix wrong type Use of Typeable means the type checker can't catch this kind of mistake, the error is deferred to runtime. testremote now passes on a directory special remote --- Remote/Helper/Chunked.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs index b68cbd511d..cff59e7312 100644 --- a/Remote/Helper/Chunked.hs +++ b/Remote/Helper/Chunked.hs @@ -60,8 +60,8 @@ getChunkConfig c = case getRemoteConfigValue chunksizeField c of Nothing -> case getRemoteConfigValue chunkField c of Nothing -> NoChunks - Just v -> readsz UnpaddedChunks (fromProposedAccepted v) chunkField - Just v -> readsz LegacyChunks (fromProposedAccepted v) chunksizeField + Just v -> readsz UnpaddedChunks v chunkField + Just v -> readsz LegacyChunks v chunksizeField where readsz mk v f = case readSize dataUnits v of Just size