avoid too long filename when making up a filename for addurl too
This commit is contained in:
parent
8f9b501515
commit
a86d937b5b
1 changed files with 1 additions and 1 deletions
|
@ -81,7 +81,7 @@ nodownload url file = do
|
|||
next $ Command.Add.cleanup file key False
|
||||
|
||||
url2file :: URI -> FilePath
|
||||
url2file url = escape $ uriRegName auth ++ uriPath url ++ uriQuery url
|
||||
url2file url = take 255 $ escape $ uriRegName auth ++ uriPath url ++ uriQuery url
|
||||
where
|
||||
escape = replace "/" "_" . replace "?" "_"
|
||||
auth = fromMaybe (error $ "bad url " ++ show url) $ uriAuthority url
|
||||
|
|
Loading…
Reference in a new issue