don't fail with --pathdepth when file already exists

This commit is contained in:
Joey Hess 2012-02-18 12:05:13 -04:00
parent 0cbbf0da79
commit abd50e01fb

View file

@ -54,8 +54,6 @@ perform url file pathdepth = ifAnnexed file addurl geturl
fast <- Annex.getState Annex.fast
if fast then nodownload url file else download url file
addurl (key, _backend) = do
when (pathdepth /= Nothing) $
error $ file ++ " already exists"
unlessM (liftIO $ Url.check url (keySize key)) $
error $ "failed to verify url: " ++ url
setUrlPresent key url