summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-12-11 13:41:41 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-12-11 13:41:41 -0400
commit5e6166cc226e7e9c48404fbdf5a3e8db4d71a21c (patch)
treeb505be6466c108b1bc63e16a567c65d16d0d9f40
parent5ed4bd079a7e93f98cf4bc57da28c89d1180d17d (diff)
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.
-rw-r--r--Command/AddUrl.hs4
1 files 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)