aboutsummaryrefslogtreecommitdiff
path: root/Command/AddUrl.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 20:08:49 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2014-12-11 20:08:49 -0400
commit892eac7f77f0e54fc8003ca9e306a76d59ebc519 (patch)
treeb2a5e59b98769e8e9a0945ae947d69ae1657004a /Command/AddUrl.hs
parentfe0fdf3b49840c19f0c2294fd958e5ed6448a827 (diff)
sanitize filepaths provided by checkUrl
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r--Command/AddUrl.hs4
1 files changed, 2 insertions, 2 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index 22e996a15..825d9bdbf 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -73,11 +73,11 @@ seek us = do
next $ next $ return False
Right (UrlContents sz mf) -> do
void $ commandAction $
- startRemote r relaxed (fromMaybe deffile mf) u sz
+ startRemote r relaxed (maybe deffile fromSafeFilePath mf) u sz
Right (UrlMulti l) ->
forM_ l $ \(u', sz, f) ->
void $ commandAction $
- startRemote r relaxed (deffile </> f) u' sz
+ startRemote r relaxed (deffile </> fromSafeFilePath f) u' sz
startRemote :: Remote -> Bool -> FilePath -> URLString -> Maybe Integer -> CommandStart
startRemote r relaxed file uri sz = do