diff options
author | Joey Hess <joeyh@joeyh.name> | 2014-12-11 15:49:40 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2014-12-11 15:49:40 -0400 |
commit | f7ef9c36f57f69d4ba6145c77553cfeabeabcbc2 (patch) | |
tree | 2366d210f5bdcd5fc31a8e93f0e9346e3b34dbde | |
parent | 57c54882f9c8b409ecbdb1e54fd39aa16a1151b7 (diff) |
addurl on an existing file that already has the url should succeed, not fail
-rw-r--r-- | Command/AddUrl.hs | 7 |
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 |