diff options
-rw-r--r-- | Remote/WebDAV.hs | 7 | ||||
-rw-r--r-- | Remote/WebDAV/DavLocation.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 4 |
3 files changed, 10 insertions, 3 deletions
diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs index 35af290ad..a135be466 100644 --- a/Remote/WebDAV.hs +++ b/Remote/WebDAV.hs @@ -260,7 +260,10 @@ existsDAV :: DavLocation -> DAVT IO (Either String Bool) existsDAV l = inLocation l check `catchNonAsync` (\e -> return (Left $ show e)) where check = do - setDepth Nothing + -- Some DAV services only support depth of 1, and + -- more depth is certainly not needed to check if a + -- location exists. + setDepth (Just Depth1) catchJust (matchStatusCodeException (== notFound404)) (getPropsM >> ispresent True) @@ -336,7 +339,7 @@ storeLegacyChunked chunksize k dav b = finalizer tmp' dest' = goDAV dav $ finalizeStore (baseURL dav) tmp' (fromJust $ locationParent dest') - tmp = keyTmpLocation k + tmp = addTrailingPathSeparator $ keyTmpLocation k dest = keyLocation k retrieveLegacyChunked :: DavHandle -> Retriever diff --git a/Remote/WebDAV/DavLocation.hs b/Remote/WebDAV/DavLocation.hs index 1397ae57e..e0e184686 100644 --- a/Remote/WebDAV/DavLocation.hs +++ b/Remote/WebDAV/DavLocation.hs @@ -44,7 +44,7 @@ keyLocation k = keyDir k ++ keyFile k {- Where we store temporary data for a key as it's being uploaded. -} keyTmpLocation :: Key -> DavLocation -keyTmpLocation = addTrailingPathSeparator . tmpLocation . keyFile +keyTmpLocation = tmpLocation . keyFile tmpLocation :: FilePath -> DavLocation tmpLocation f = tmpDir </> f diff --git a/debian/changelog b/debian/changelog index c6eb05287..fca0e1564 100644 --- a/debian/changelog +++ b/debian/changelog @@ -22,6 +22,10 @@ git-annex (6.20160127) UNRELEASED; urgency=medium * init: Fix bugs in submodule .git symlink fixup, that occurred when initializing in a subdirectory of a submodule and a submodule of a submodule. + * WebDAV: Set depth 1 in PROPFIND request, for better compatability with + some servers. Thanks, wzhd. + * WebDAV: Remove a bogus trailing slash from the end of the url to the + temporary store location for a key. Thanks, wzhd. -- Joey Hess <id@joeyh.name> Thu, 28 Jan 2016 13:53:09 -0400 |