From bc923198dda388a90ba82225d6aa9fc2b75b907d Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 9 Feb 2016 11:50:40 -0400 Subject: WebDAV: Remove a bogus trailing slash from the end of the url to the temporary store location for a key. Thanks, wzhd. That trailing slash is needed for legacy chunked mode, because it puts the chunks in a subdir under the key. But, outside legacy chunked mode, it's BS and it's amazing it worked at all with some webdav servers. --- Remote/WebDAV.hs | 2 +- Remote/WebDAV/DavLocation.hs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'Remote') diff --git a/Remote/WebDAV.hs b/Remote/WebDAV.hs index 87df16e93..a135be466 100644 --- a/Remote/WebDAV.hs +++ b/Remote/WebDAV.hs @@ -339,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 -- cgit v1.2.3