fix recorded url when using --file with external special remote

The youtube changes accidentially caused the OtherDownloader url to not
get used here, which broke datalad's test suite luckily.

This commit was supported by the NSF-funded DataLad project.
This commit is contained in:
Joey Hess 2017-12-11 13:41:41 -04:00
parent e429fa597b
commit bd7f8be121
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -158,8 +158,8 @@ performRemote r o uri file sz = ifAnnexed file adduri geturi
loguri = setDownloader uri OtherDownloader
adduri = addUrlChecked o loguri file (Remote.uuid r) checkexistssize
checkexistssize key = return $ case sz of
Nothing -> (True, True, uri)
Just n -> (True, n == fromMaybe n (keySize key), uri)
Nothing -> (True, True, loguri)
Just n -> (True, n == fromMaybe n (keySize key), loguri)
geturi = next $ isJust <$> downloadRemoteFile r (downloadOptions o) uri file sz
downloadRemoteFile :: Remote -> DownloadOptions -> URLString -> FilePath -> Maybe Integer -> Annex (Maybe Key)