fetchsvn: correctly handle trailing slashes

`splitString` does not split on trailing separators.
This commit is contained in:
Thomas Tuegel
2015-12-06 11:49:51 -06:00
parent 8498f9d46b
commit 63eb6fdd8a
+1 -1
View File
@@ -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