diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-26 15:03:12 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-26 15:03:12 -0400 |
commit | 691958612b7b59cfd99a694b34fc1986f84eaa2e (patch) | |
tree | 28d89d004ac42013cea001ae8eea9780f0ef765a /Remote/Directory.hs | |
parent | 618e3ae6364bbcade9d7bb657412418967ae4143 (diff) |
directory, webdav: Fix bug introduced in version 4.20131002 that caused the chunkcount file to not be written. Work around repositories without such a file, so files can still be retreived from them.
Diffstat (limited to 'Remote/Directory.hs')
-rw-r--r-- | Remote/Directory.hs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index 1a4dbf45c..cee4d6a0a 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -109,9 +109,13 @@ withCheckedFiles check (Just _) d k a = go $ locations d k ifM (check chunkcount) ( do chunks <- listChunks f <$> readFile chunkcount - ifM (and <$> mapM check chunks) + ifM (allM check chunks) ( a chunks , return False ) - , go fs + , do + chunks <- probeChunks f check + if null chunks + then go fs + else a chunks ) withStoredFiles :: ChunkSize -> FilePath -> Key -> ([FilePath] -> IO Bool) -> IO Bool |