From f7ef9c36f57f69d4ba6145c77553cfeabeabcbc2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 11 Dec 2014 15:49:40 -0400 Subject: addurl on an existing file that already has the url should succeed, not fail --- Command/AddUrl.hs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'Command/AddUrl.hs') 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 -- cgit v1.2.3