diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index cf8aae17cc..ceb35224d2 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -60,16 +60,20 @@ perform relaxed url file = ifAnnexed file addurl geturl liftIO $ createDirectoryIfMissing True (parentDir file) ifM (Annex.getState Annex.fast <||> pure relaxed) ( nodownload relaxed url file , download url file ) - addurl (key, _backend) = do - headers <- getHttpHeaders - ifM (liftIO $ Url.check url headers $ keySize key) - ( do - setUrlPresent key url - next $ return True - , do - warning $ "failed to verify url: " ++ url - stop - ) + addurl (key, _backend) + | relaxed = do + setUrlPresent key url + next $ return True + | otherwise = do + headers <- getHttpHeaders + ifM (liftIO $ Url.check url headers $ keySize key) + ( do + setUrlPresent key url + next $ return True + , do + warning $ "failed to verify url: " ++ url + stop + ) download :: String -> FilePath -> CommandPerform download url file = do diff --git a/doc/bugs/addurl_--relaxed_with_--file_doesn__39__t_actually_relax.mdwn b/doc/bugs/addurl_--relaxed_with_--file_doesn__39__t_actually_relax.mdwn index 09e91f380d..9118a5041f 100644 --- a/doc/bugs/addurl_--relaxed_with_--file_doesn__39__t_actually_relax.mdwn +++ b/doc/bugs/addurl_--relaxed_with_--file_doesn__39__t_actually_relax.mdwn @@ -22,3 +22,5 @@ Debian Sid supported repository versions: 3 4 upgrade supported from repository versions: 0 1 2 build flags: Assistant Webapp Pairing Testsuite S3 WebDAV Inotify DBus XMPP DNS + +> Missed the case of adding an url to an existing file. [[done]] --[[Joey]]