diff options
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r-- | Command/AddUrl.hs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 6c945baf9..c87399f5d 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -51,17 +51,17 @@ perform url file = ifAnnexed file addurl geturl where geturl = do liftIO $ createDirectoryIfMissing True (parentDir file) - fast <- Annex.getState Annex.fast - if fast then nodownload url file else download url file - addurl (key, _backend) = do - ok <- liftIO $ Url.check url (keySize key) - if ok - then do + ifM (Annex.getState Annex.fast) + ( nodownload url file , download url file ) + addurl (key, _backend) = + ifM (liftIO $ Url.check url $ keySize key) + ( do setUrlPresent key url next $ return True - else do + , do warning $ "failed to verify url: " ++ url stop + ) download :: String -> FilePath -> CommandPerform download url file = do |