fetchsvn: correctly handle trailing slashes

`splitString` does not split on trailing separators.
This commit is contained in:
Thomas Tuegel 2015-08-22 21:09:21 -05:00
parent 8498f9d46b
commit 63eb6fdd8a

View File

@ -8,7 +8,7 @@ let
snd = l: head (tail l);
trd = l: head (tail (tail l));
path_ = reverseList (splitString "/" url);
path = if head path_ == "" then tail path_ else path_;
path = [ (removeSuffix "/" (head path_)) ] ++ (tail path_);
in
# ../repo/trunk -> repo
if fst path == "trunk" then snd path