back to standard directory layout for webdav remotes
This allows deleting all chunks for a file with a single http command, so it's a win after all. However, does not look in the mixed case hash directories, which were in the past used by the directory, etc remotes.
This commit is contained in:
parent
a1869ad662
commit
0b3126a30b
1 changed files with 6 additions and 6 deletions
|
@ -129,11 +129,11 @@ retrieveHelper r k saver = davAction r False $ \(baseurl, user, pass) -> liftIO
|
|||
return True
|
||||
|
||||
remove :: Remote -> Key -> Annex Bool
|
||||
remove r k = davAction r False $ liftIO . go
|
||||
where
|
||||
go (baseurl, user, pass) = do
|
||||
let url = davLocation baseurl k
|
||||
isJust <$> catchMaybeHttp (deleteContent url user pass)
|
||||
remove r k = davAction r False $ \(baseurl, user, pass) -> liftIO $ do
|
||||
-- Delete the key's whole directory, including any chunked
|
||||
-- files, etc, in a single action.
|
||||
let url = urlParent $ davLocation baseurl k
|
||||
isJust <$> catchMaybeHttp (deleteContent url user pass)
|
||||
|
||||
checkPresent :: Remote -> Key -> Annex (Either String Bool)
|
||||
checkPresent r k = davAction r noconn $ \(baseurl, user, pass) -> do
|
||||
|
@ -168,7 +168,7 @@ toDavPass = B8.fromString
|
|||
|
||||
{- The location to use to store a Key. -}
|
||||
davLocation :: DavUrl -> Key -> DavUrl
|
||||
davLocation baseurl k = davUrl baseurl $ hashDirLower k </> keyFile k
|
||||
davLocation baseurl k = davUrl baseurl $ annexLocation k hashDirLower
|
||||
|
||||
davUrl :: DavUrl -> FilePath -> DavUrl
|
||||
davUrl baseurl file = baseurl </> file
|
||||
|
|
Loading…
Reference in a new issue