From 69a0161c3afb9d6f7062ffac206044d95d3ee85a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 16 Feb 2012 19:37:02 -0400 Subject: fix filename limit when using --pathdepth --- Command/AddUrl.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Command/AddUrl.hs') diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index f87417d5d..3d484a1d3 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -95,8 +95,8 @@ url2file url pathdepth = case pathdepth of | otherwise -> error "bad --pathdepth" where fullurl = uriRegName auth ++ uriPath url ++ uriQuery url - frombits a = filesize $ join "/" $ a urlbits - urlbits = map escape $ filter (not . null) $ split "/" fullurl + frombits a = join "/" $ a urlbits + urlbits = map (filesize . escape) $ filter (not . null) $ split "/" fullurl auth = fromMaybe (error $ "bad url " ++ show url) $ uriAuthority url filesize = take 255 escape = replace "/" "_" . replace "?" "_" -- cgit v1.2.3