diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-08-19 12:24:55 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-08-19 12:24:55 -0400 |
commit | 52f4a0722c3c6f71cea0666cba3f27adc085d629 (patch) | |
tree | 3789171e5fc0628d4fcd549309333ce1cd9eb9ee /Command | |
parent | bbd8b63d4768c51bb804dcf03a17fdd895997ab5 (diff) |
importfeed --relaxed: Avoid hitting the urls of items in the feed.
Diffstat (limited to 'Command')
-rw-r--r-- | Command/AddUrl.hs | 2 | ||||
-rw-r--r-- | Command/ImportFeed.hs | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index adc0d3a1e..de3bff407 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -182,7 +182,7 @@ startWeb o s = go $ fromMaybe bad $ parseURI urlstring regulardownload url = do pathmax <- liftIO $ fileNameLengthLimit "." urlinfo <- if relaxedOption o - then pure $ Url.UrlInfo True Nothing Nothing + then pure Url.assumeUrlExists else Url.withUrlOptions (Url.getUrlInfo urlstring) file <- adjustFile o <$> case fileOption o of Just f -> pure f diff --git a/Command/ImportFeed.hs b/Command/ImportFeed.hs index 46e1b6dbe..d82d73447 100644 --- a/Command/ImportFeed.hs +++ b/Command/ImportFeed.hs @@ -172,7 +172,9 @@ performDownload opts cache todownload = case location todownload of r <- Remote.claimingUrl url if Remote.uuid r == webUUID || rawOption opts then do - urlinfo <- Url.withUrlOptions (Url.getUrlInfo url) + urlinfo <- if relaxedOption opts + then pure Url.assumeUrlExists + else Url.withUrlOptions (Url.getUrlInfo url) maybeToList <$> addUrlFile (relaxedOption opts) url urlinfo f else do res <- tryNonAsync $ maybe |