diff options
Diffstat (limited to 'Remote')
-rw-r--r-- | Remote/WebDAV/DavLocation.hs | 5 |
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 |