importfeed: Drop URL parameters from file extension.
authorJoey Hess <joeyh@joeyh.name>
Mon, 17 Oct 2016 20:02:05 +0000 (16:02 -0400)
committerJoey Hess <joeyh@joeyh.name>
Mon, 17 Oct 2016 20:02:05 +0000 (16:02 -0400)
Thanks, James MacMahon.

CHANGELOG
Command/ImportFeed.hs
doc/todo/PATCH__58___drop_url_parameters_from_extension.hs

index b34cfce0d7007bbf853ea1c1b23f7ebc61330ad7..816c4d70cf347f85f12d94faeb4a8d9a8f275a60 100644 (file)
--- 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 <id@joeyh.name>  Mon, 17 Oct 2016 12:46:54 -0400
 
index 498d5041c70499a88dc829562369b69c51336af5..8f3a6072613c7f55d963e647d745b4c46c313bf6 100644 (file)
@@ -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
index 4b4ec330bb675a0d7eb37342a996fb29378d9cf4..580ed96babd82a36e2b544a11393c5f25901c29c 100644 (file)
@@ -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]]