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.
This commit is contained in:
parent
06ea92282f
commit
5756636486
5 changed files with 42 additions and 7 deletions
|
@ -198,8 +198,14 @@ withStoredFiles
|
|||
withStoredFiles r k baseurl user pass onerr a
|
||||
| isJust $ chunkSize $ config r = do
|
||||
let chunkcount = keyurl ++ chunkCount
|
||||
maybe (onerr chunkcount) (a . listChunks keyurl . L8.toString)
|
||||
=<< davGetUrlContent chunkcount user pass
|
||||
v <- davGetUrlContent chunkcount user pass
|
||||
case v of
|
||||
Just s -> a $ listChunks keyurl $ L8.toString s
|
||||
Nothing -> do
|
||||
chunks <- probeChunks keyurl $ \u -> (== Right True) <$> davUrlExists u user pass
|
||||
if null chunks
|
||||
then onerr chunkcount
|
||||
else a chunks
|
||||
| otherwise = a [keyurl]
|
||||
where
|
||||
keyurl = davLocation baseurl k ++ keyFile k
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue