diff options
author | 2016-10-17 16:02:05 -0400 | |
---|---|---|
committer | 2016-10-17 16:02:05 -0400 | |
commit | 6c5e0ff683dd9e66f68c96b8775df2ac65281d3b (patch) | |
tree | e84611b3349565bb8abf8d1debef5aa27ed25023 | |
parent | e7ed9289866753a5dfaf3454bd9345a271f5c208 (diff) |
importfeed: Drop URL parameters from file extension.
Thanks, James MacMahon.
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | Command/ImportFeed.hs | 2 | ||||
-rw-r--r-- | doc/todo/PATCH__58___drop_url_parameters_from_extension.hs | 2 |
3 files changed, 5 insertions, 1 deletions
@@ -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 <id@joeyh.name> Mon, 17 Oct 2016 12:46:54 -0400 diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index 498d5041c..8f3a60726 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 4b4ec330b..580ed96ba 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]] |