From 5e6166cc226e7e9c48404fbdf5a3e8db4d71a21c Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 11 Dec 2017 13:41:41 -0400 Subject: 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. --- Command/AddUrl.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index b5ec929a4..406682e73 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -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) -- cgit v1.2.3