sanitize filepaths provided by checkUrl

This commit is contained in:
Joey Hess 2014-12-11 20:08:49 -04:00
parent b0ca0985ce
commit 67c05daf5e
5 changed files with 41 additions and 10 deletions

View file

@ -156,7 +156,7 @@ performDownload relaxed cache todownload = case location todownload of
downloadRemoteFile r relaxed url f sz
Right (UrlMulti l) -> do
kl <- forM l $ \(url', sz, subf) ->
downloadRemoteFile r relaxed url' (f </> subf) sz
downloadRemoteFile r relaxed url' (f </> fromSafeFilePath subf) sz
return $ if all isJust kl
then catMaybes kl
else []