remove SafeFilePath

Move sanitizeFilePath call to where fromSafeFilePath had been.
This commit is contained in:
Joey Hess 2020-05-11 14:04:56 -04:00
parent cabbc91b18
commit 5f5170b22b
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
6 changed files with 16 additions and 32 deletions

View file

@ -401,8 +401,8 @@ torrentContents :: URLString -> Annex UrlContents
torrentContents u = convert
<$> (liftIO . torrentFileSizes =<< tmpTorrentFile u)
where
convert [(fn, sz)] = UrlContents (Just sz) (Just (mkSafeFilePath fn))
convert [(fn, sz)] = UrlContents (Just sz) (Just fn)
convert l = UrlMulti $ map mkmulti (zip l [1..])
mkmulti ((fn, sz), n) =
(torrentUrlWithNum u n, Just sz, mkSafeFilePath $ joinPath $ drop 1 $ splitPath fn)
(torrentUrlWithNum u n, Just sz, joinPath $ drop 1 $ splitPath fn)