diff options
-rw-r--r-- | Command/AddUrl.hs | 2 | ||||
-rw-r--r-- | Logs/Web.hs | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 66a5c4e3d..97adc75ee 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -210,7 +210,7 @@ addUrlChecked relaxed url u checkexistssize key | relaxed = do setUrlPresent u key url next $ return True - | otherwise = ifM (elem url <$> getUrls key) + | otherwise = ifM ((elem url <$> getUrls key) <&&> (elem u <$> loggedLocations key)) ( next $ return True -- nothing to do , do (exists, samesize) <- checkexistssize key diff --git a/Logs/Web.hs b/Logs/Web.hs index a728d152b..39f177c3b 100644 --- a/Logs/Web.hs +++ b/Logs/Web.hs @@ -54,9 +54,9 @@ getUrlsWithPrefix key prefix = filter (prefix `isPrefixOf`) <$> getUrls key setUrlPresent :: UUID -> Key -> URLString -> Annex () setUrlPresent uuid key url = do us <- getUrls key - unless (url `elem` us) $ do + unless (url `elem` us) $ addLog (urlLogFile key) =<< logNow InfoPresent url - logChange key uuid InfoPresent + logChange key uuid InfoPresent setUrlMissing :: UUID -> Key -> URLString -> Annex () setUrlMissing uuid key url = do |