fix exporting files in subdirectories to webdav
Use tmp/key when exporting, so the whole export directory structure does not have to be created under tmp/ This commit was sponsored by Denis Dzyubenko on Patreon.
This commit is contained in:
parent
969ac892a8
commit
955c616956
2 changed files with 2 additions and 5 deletions
|
@ -179,9 +179,9 @@ checkKey r chunkconfig (Just dav) k = do
|
|||
either giveup return v
|
||||
|
||||
storeExportDav :: Maybe DavHandle -> FilePath -> Key -> ExportLocation -> MeterUpdate -> Annex Bool
|
||||
storeExportDav mh f _k loc p = runExport mh $ \dav -> do
|
||||
storeExportDav mh f k loc p = runExport mh $ \dav -> do
|
||||
reqbody <- liftIO $ httpBodyStorer f p
|
||||
storeHelper dav (exportTmpLocation loc) (exportLocation loc) reqbody
|
||||
storeHelper dav (keyTmpLocation k) (exportLocation loc) reqbody
|
||||
return True
|
||||
|
||||
retrieveExportDav :: Maybe DavHandle -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex Bool
|
||||
|
|
|
@ -53,9 +53,6 @@ keyTmpLocation = tmpLocation . keyFile
|
|||
exportLocation :: ExportLocation -> DavLocation
|
||||
exportLocation (ExportLocation f) = f
|
||||
|
||||
exportTmpLocation :: ExportLocation -> DavLocation
|
||||
exportTmpLocation (ExportLocation f) = tmpLocation f
|
||||
|
||||
tmpLocation :: FilePath -> DavLocation
|
||||
tmpLocation f = tmpDir </> f
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue