summaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
Diffstat (limited to 'Remote')
-rw-r--r--Remote/WebDAV/DavLocation.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/Remote/WebDAV/DavLocation.hs b/Remote/WebDAV/DavLocation.hs
index cbe87e6a7..42c9d35d4 100644
--- a/Remote/WebDAV/DavLocation.hs
+++ b/Remote/WebDAV/DavLocation.hs
@@ -58,10 +58,11 @@ tmpLocation f = "git-annex-webdav-tmp-" ++ f
locationParent :: String -> Maybe String
locationParent loc
- | loc `elem` tops = Nothing
- | otherwise = Just (takeDirectory loc)
+ | loc `elem` tops || parent `elem` tops = Nothing
+ | otherwise = Just parent
where
tops = ["/", "", "."]
+ parent = takeDirectory loc
locationUrl :: URLString -> DavLocation -> URLString
locationUrl baseurl loc = baseurl </> loc