summaryrefslogtreecommitdiff
path: root/Command
diff options
context:
space:
mode:
Diffstat (limited to 'Command')
-rw-r--r--Command/AddUrl.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs
index e23f4262b..981af2f7e 100644
--- a/Command/AddUrl.hs
+++ b/Command/AddUrl.hs
@@ -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