summaryrefslogtreecommitdiff
path: root/Remote/WebDAV.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-15 15:52:31 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-15 15:52:31 -0400
commit4c88513e1894c4d02dd7b1cc5dc1e3d536429f13 (patch)
tree70f0784ad261e9f7150a9518e6b87d5de31cd854 /Remote/WebDAV.hs
parent24d7320583f744f09bbee393ff7fd82121c32b96 (diff)
webdav: Changed path used on webdav server for temporary files.
Done to avoid a "tmp" directory appearing in webdav exports. Also affects non-export webdav remotes, so interrupted uploads using the old path will not overwrite it. However, PUT is quite likely to be implemented atomically on web servers anyway, so I doubt this will cause problems.
Diffstat (limited to 'Remote/WebDAV.hs')
-rw-r--r--Remote/WebDAV.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs
index 61fc70324..ce27dd551 100644
--- a/Remote/WebDAV.hs
+++ b/Remote/WebDAV.hs
@@ -127,7 +127,7 @@ store _ (Just dav) = httpStorer $ \k reqbody -> liftIO $ goDAV dav $ do
storeHelper :: DavHandle -> DavLocation -> DavLocation -> RequestBody -> DAVT IO ()
storeHelper dav tmp dest reqbody = do
- void $ mkColRecursive tmpDir
+ maybe noop (void . mkColRecursive) (locationParent tmp)
inLocation tmp $
putContentM' (contentType, reqbody)
finalizeStore dav tmp dest
@@ -257,8 +257,8 @@ testDav url (Just (u, p)) = do
test $ liftIO $ evalDAVT url $ do
prepDAV user pass
makeParentDirs
- void $ mkColRecursive tmpDir
- inLocation (tmpLocation "git-annex-test") $ do
+ void $ mkColRecursive "/"
+ inLocation (tmpLocation "test") $ do
putContentM (Nothing, L8.fromString "test")
delContentM
where