diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-16 19:37:02 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-16 19:37:02 -0400 |
commit | 69a0161c3afb9d6f7062ffac206044d95d3ee85a (patch) | |
tree | 2ae035c21a279b52243f571452f6f850dcd6fff7 | |
parent | 990fcad9787ef5fa3b7c039c3ee01ef298b60a27 (diff) |
fix filename limit when using --pathdepth
-rw-r--r-- | Command/AddUrl.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 "?" "_" |