remove SafeFilePath
Move sanitizeFilePath call to where fromSafeFilePath had been.
This commit is contained in:
parent
cabbc91b18
commit
5f5170b22b
6 changed files with 16 additions and 32 deletions
|
@ -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)
|
||||
|
|
|
@ -769,14 +769,14 @@ checkUrlM :: External -> URLString -> Annex UrlContents
|
|||
checkUrlM external url =
|
||||
handleRequest external (CHECKURL url) Nothing $ \req -> case req of
|
||||
CHECKURL_CONTENTS sz f -> result $ UrlContents sz $
|
||||
if null f then Nothing else Just $ mkSafeFilePath f
|
||||
if null f then Nothing else Just f
|
||||
CHECKURL_MULTI l -> result $ UrlMulti $ map mkmulti l
|
||||
CHECKURL_FAILURE errmsg -> Just $ giveup $
|
||||
respErrorMessage "CHECKURL" errmsg
|
||||
UNSUPPORTED_REQUEST -> giveup "CHECKURL not implemented by external special remote"
|
||||
_ -> Nothing
|
||||
where
|
||||
mkmulti (u, s, f) = (u, s, mkSafeFilePath f)
|
||||
mkmulti (u, s, f) = (u, s, f)
|
||||
|
||||
retrieveUrl :: Retriever
|
||||
retrieveUrl = fileRetriever $ \f k p -> do
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue