parent
4af849bc12
commit
4f67dcb24a
49 changed files with 78 additions and 78 deletions
|
@ -992,11 +992,11 @@ impl GenericPath for WindowsPath {
|
|||
pub fn normalize(components: &[~str]) -> ~[~str] {
|
||||
let mut cs = ~[];
|
||||
for c in components.iter() {
|
||||
if *c == ~"." && components.len() > 1 { loop; }
|
||||
if *c == ~"" { loop; }
|
||||
if *c == ~"." && components.len() > 1 { continue; }
|
||||
if *c == ~"" { continue; }
|
||||
if *c == ~".." && cs.len() != 0 {
|
||||
cs.pop();
|
||||
loop;
|
||||
continue;
|
||||
}
|
||||
cs.push((*c).clone());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue