move use of </> into DavLocation so it always uses unix filepaths due to
imports
This commit is contained in:
Joey Hess 2021-03-12 15:16:23 -04:00
parent f064008543
commit 3e41a8f032
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
2 changed files with 6 additions and 1 deletions

View file

@ -212,7 +212,7 @@ storeExportDav :: DavHandleVar -> FilePath -> Key -> ExportLocation -> MeterUpda
storeExportDav hdl f k loc p = case exportLocation loc of
Right dest -> withDavHandle hdl $ \h -> runExport h $ \dav -> do
reqbody <- liftIO $ httpBodyStorer f p
storeHelper dav (takeDirectory dest </> keyTmpLocation k) dest reqbody
storeHelper dav (exportTmpLocation loc k) dest reqbody
Left err -> giveup err
retrieveExportDav :: DavHandleVar -> Key -> ExportLocation -> FilePath -> MeterUpdate -> Annex ()

View file

@ -62,6 +62,11 @@ exportLocation l =
keyTmpLocation :: Key -> DavLocation
keyTmpLocation = tmpLocation . fromRawFilePath . keyFile
exportTmpLocation :: ExportLocation -> Key -> DavLocation
exportTmpLocation l k = d </> keyTmpLocation k
where
d = takeDirectory (fromRawFilePath (fromExportLocation l))
tmpLocation :: FilePath -> DavLocation
tmpLocation f = "git-annex-webdav-tmp-" ++ f