zero still bad
This commit is contained in:
parent
346c934409
commit
d05550e803
1 changed files with 2 additions and 1 deletions
|
@ -91,7 +91,8 @@ url2file url pathdepth = case pathdepth of
|
||||||
Nothing -> filesize $ escape fullurl
|
Nothing -> filesize $ escape fullurl
|
||||||
Just depth
|
Just depth
|
||||||
| depth > 0 -> frombits $ drop 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
|
where
|
||||||
fullurl = uriRegName auth ++ uriPath url ++ uriQuery url
|
fullurl = uriRegName auth ++ uriPath url ++ uriQuery url
|
||||||
frombits a = filesize $ join "/" $ a urlbits
|
frombits a = filesize $ join "/" $ a urlbits
|
||||||
|
|
Loading…
Add table
Reference in a new issue