From: Joey Hess Date: Mon, 17 Oct 2016 20:02:05 +0000 (-0400) Subject: importfeed: Drop URL parameters from file extension. X-Git-Tag: archive/raspbian/10.20250416-2+rpi1~1^2~294^2~50 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=0b1c0613827ce7715125b196ef7c2d003986a84e;p=git-annex.git importfeed: Drop URL parameters from file extension. Thanks, James MacMahon. --- diff --git a/CHANGELOG b/CHANGELOG index b34cfce0d7..816c4d70cf 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -5,6 +5,8 @@ git-annex (6.20161013) UNRELEASED; urgency=medium * upgrade: Handle upgrade to v6 when the repository already contains v6 unlocked files whose content is already present. * Improve style of offline html build of website. + * importfeed: Drop URL parameters from file extension. + Thanks, James MacMahon. -- Joey Hess Mon, 17 Oct 2016 12:46:54 -0400 diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index 498d5041c7..8f3a607261 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -161,7 +161,7 @@ downloadFeed url performDownload :: ImportFeedOptions -> Cache -> ToDownload -> Annex Bool performDownload opts cache todownload = case location todownload of Enclosure url -> checkknown url $ - rundownload url (takeExtension url) $ \f -> do + rundownload url (takeWhile (/= '?') $ takeExtension url) $ \f -> do r <- Remote.claimingUrl url if Remote.uuid r == webUUID || rawOption opts then do diff --git a/doc/todo/PATCH__58___drop_url_parameters_from_extension.hs b/doc/todo/PATCH__58___drop_url_parameters_from_extension.hs index 4b4ec330bb..580ed96bab 100644 --- a/doc/todo/PATCH__58___drop_url_parameters_from_extension.hs +++ b/doc/todo/PATCH__58___drop_url_parameters_from_extension.hs @@ -52,3 +52,5 @@ index 498d504..210aca0 100644 if Remote.uuid r == webUUID || rawOption opts then do +> Hmm, didn't cleanly apply for some reason. And, `takeWhile (/= '?')` is a +> simpler way to do that. Thank you for the bug report and patch; [[done]] --[[Joey]]