move
move use of </> into DavLocation so it always uses unix filepaths due to imports
This commit is contained in:
parent
f064008543
commit
3e41a8f032
2 changed files with 6 additions and 1 deletions
|
@ -212,7 +212,7 @@ storeExportDav :: DavHandleVar -> FilePath -> Key -> ExportLocation -> MeterUpda
|
||||||
storeExportDav hdl f k loc p = case exportLocation loc of
|
storeExportDav hdl f k loc p = case exportLocation loc of
|
||||||
Right dest -> withDavHandle hdl $ \h -> runExport h $ \dav -> do
|
Right dest -> withDavHandle hdl $ \h -> runExport h $ \dav -> do
|
||||||
reqbody <- liftIO $ httpBodyStorer f p
|
reqbody <- liftIO $ httpBodyStorer f p
|
||||||
storeHelper dav (takeDirectory dest </> keyTmpLocation k) dest reqbody
|
storeHelper dav (exportTmpLocation loc k) dest reqbody
|
||||||
Left err -> giveup err
|
Left err -> giveup err
|
||||||
|
|
||||||
retrieveExportDav :: DavHandleVar -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex ()
|
retrieveExportDav :: DavHandleVar -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex ()
|
||||||
|
|
|
@ -62,6 +62,11 @@ exportLocation l =
|
||||||
keyTmpLocation :: Key -> DavLocation
|
keyTmpLocation :: Key -> DavLocation
|
||||||
keyTmpLocation = tmpLocation . fromRawFilePath . keyFile
|
keyTmpLocation = tmpLocation . fromRawFilePath . keyFile
|
||||||
|
|
||||||
|
exportTmpLocation :: ExportLocation -> Key -> DavLocation
|
||||||
|
exportTmpLocation l k = d </> keyTmpLocation k
|
||||||
|
where
|
||||||
|
d = takeDirectory (fromRawFilePath (fromExportLocation l))
|
||||||
|
|
||||||
tmpLocation :: FilePath -> DavLocation
|
tmpLocation :: FilePath -> DavLocation
|
||||||
tmpLocation f = "git-annex-webdav-tmp-" ++ f
|
tmpLocation f = "git-annex-webdav-tmp-" ++ f
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue