diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-11 14:09:57 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-11 14:09:57 -0400 |
commit | 4e88f7e9af6a776347649047f2473e470a729ed9 (patch) | |
tree | baa24cac409b25155aed0bcb7e006028ab743dc4 /Annex | |
parent | 9949e46e150be17320c22a096ead5ffd0fb5a8a6 (diff) |
Revert "let url claims optionally include a suggested filename"
This reverts commit bc0bf97b20c48e1d1a35d25e2e76a311c102438c.
Putting filename in the claim was a bad idea.
Diffstat (limited to 'Annex')
-rw-r--r-- | Annex/URLClaim.hs | 29 |
1 files changed, 0 insertions, 29 deletions
diff --git a/Annex/URLClaim.hs b/Annex/URLClaim.hs deleted file mode 100644 index 3acb28e29..000000000 --- a/Annex/URLClaim.hs +++ /dev/null @@ -1,29 +0,0 @@ -{- Url claim checking. - - - - Copyright 2013-2014 Joey Hess <joey@kitenet.net> - - - - Licensed under the GNU GPL version 3 or higher. - -} - -module Annex.URLClaim ( - URLClaim(..), - urlClaim -) where - -import Common.Annex -import Types.URLClaim -import Logs.Web -import Remote -import qualified Types.Remote as Remote - -urlClaim :: URLString -> Annex (Remote, URLClaim) -urlClaim url = do - rs <- remoteList - -- The web special remote claims urls by default. - let web = Prelude.head $ filter (\r -> uuid r == webUUID) rs - fromMaybe (web, URLClaimed) <$> getM (\r -> ret r <$> checkclaim r) rs - where - checkclaim = maybe (pure Nothing) (flip id url) . Remote.claimUrl - - ret _ Nothing = Nothing - ret r (Just c) = Just (r, c) |