nitlanguage
/
nit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
50768b3
)
lib: handle ../.. in the simplify_path method
author
Jean Privat
<jean@pryen.org>
Fri, 17 Feb 2012 21:05:55 +0000
(16:05 -0500)
committer
Jean Privat
<jean@pryen.org>
Fri, 17 Feb 2012 21:05:55 +0000
(16:05 -0500)
Signed-off-by: Jean Privat <jean@pryen.org>
lib/standard/file.nit
patch
|
blob
|
history
diff --git
a/lib/standard/file.nit
b/lib/standard/file.nit
index
00fbb32
..
b7e3a15
100644
(file)
--- a/
lib/standard/file.nit
+++ b/
lib/standard/file.nit
@@
-249,7
+249,7
@@
redef class String
for x in a do
if x == "." then continue
if x == "" and not a2.is_empty then continue
- if x == ".." and not a2.is_empty then
+ if x == ".." and not a2.is_empty and a2.last != ".." then
a2.pop
continue
end