diff options
author | Joey Hess <joey@kitenet.net> | 2012-02-16 14:28:17 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-02-16 14:28:54 -0400 |
commit | d05550e8039dc38b6c83c88aef7da8a593b7c5aa (patch) | |
tree | 98d8f645e0f0c67077f681b528aa44bc25d136b9 /Command/AddUrl.hs | |
parent | 346c9344094635edbcf85ac6ddb27b8235038d8a (diff) |
zero still bad
Diffstat (limited to 'Command/AddUrl.hs')
-rw-r--r-- | Command/AddUrl.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/AddUrl.hs b/Command/AddUrl.hs index 0b4131067..f87417d5d 100644 --- a/Command/AddUrl.hs +++ b/Command/AddUrl.hs @@ -91,7 +91,8 @@ url2file url pathdepth = case pathdepth of Nothing -> filesize $ escape fullurl Just depth | depth > 0 -> frombits $ drop depth - | otherwise -> frombits $ reverse . take (negate depth) . reverse + | depth < 0 -> frombits $ reverse . take (negate depth) . reverse + | otherwise -> error "bad --pathdepth" where fullurl = uriRegName auth ++ uriPath url ++ uriQuery url frombits a = filesize $ join "/" $ a urlbits |