fetchsvn: correctly handle trailing slashes
`splitString` does not split on trailing separators.
This commit is contained in:
parent
8498f9d46b
commit
63eb6fdd8a
@ -8,7 +8,7 @@ let
|
|||||||
snd = l: head (tail l);
|
snd = l: head (tail l);
|
||||||
trd = l: head (tail (tail l));
|
trd = l: head (tail (tail l));
|
||||||
path_ = reverseList (splitString "/" url);
|
path_ = reverseList (splitString "/" url);
|
||||||
path = if head path_ == "" then tail path_ else path_;
|
path = [ (removeSuffix "/" (head path_)) ] ++ (tail path_);
|
||||||
in
|
in
|
||||||
# ../repo/trunk -> repo
|
# ../repo/trunk -> repo
|
||||||
if fst path == "trunk" then snd path
|
if fst path == "trunk" then snd path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user