diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-01-22 14:52:52 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-01-22 14:52:52 -0400 |
commit | 07211ad1d80d2be9693c5f37f1bf104c6ce6baa0 (patch) | |
tree | 43fedb306be22459b548589afa08efd5c64f636a /Command/ImportFeed.hs | |
parent | c222a65270a95a59307377f81522a46d95db6e9a (diff) |
addurl: When a Content-Disposition header suggests a filename to use, addurl will consider using it, if it's reasonable and doesn't conflict with an existing file. (--file overrides this)
Diffstat (limited to 'Command/ImportFeed.hs')
-rw-r--r-- | Command/ImportFeed.hs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index b9d78d713..ed035fa85 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -144,7 +144,9 @@ performDownload relaxed cache todownload = case location todownload of rundownload url (takeExtension url) $ \f -> do r <- Remote.claimingUrl url if Remote.uuid r == webUUID - then maybeToList <$> addUrlFile relaxed url f + then do + urlinfo <- Url.withUrlOptions (Url.getUrlInfo url) + maybeToList <$> addUrlFile relaxed url urlinfo f else do res <- tryNonAsync $ maybe (error $ "unable to checkUrl of " ++ Remote.name r) |