summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:49:40 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 15:49:40 -0400
commitf7ef9c36f57f69d4ba6145c77553cfeabeabcbc2 (patch)
tree2366d210f5bdcd5fc31a8e93f0e9346e3b34dbde
parent57c54882f9c8b409ecbdb1e54fd39aa16a1151b7 (diff)
addurl on an existing file that already has the url should succeed, not fail
-rw-r--r--Command/AddUrl.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index 6f14ed861..aaa112803 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -64,9 +64,8 @@ seek us = do
UrlContents sz mkf ->
void $ commandAction $
startRemote r relaxed optfile pathdepth url sz mkf
- UrlNested l ->
- forM_ l $ \(url', c) ->
- handlecontents url' c
+ UrlNested l -> forM_ l $
+ uncurry handlecontents
res <- tryNonAsync $ maybe
(error "unable to checkUrl")
(flip id u)
@@ -210,7 +209,7 @@ addUrlChecked relaxed url u checkexistssize key
setUrlPresent u key url
next $ return True
| otherwise = ifM (elem url <$> getUrls key)
- ( stop
+ ( next $ return True -- nothing to do
, do
(exists, samesize) <- checkexistssize key
if exists && samesize