Skip to content

Commit d679078

Browse files
committed
---
yaml --- r: 2383 b: refs/heads/master c: c80255e h: refs/heads/master i: 2381: 7596eef 2379: 7d957bd 2375: 72095a1 2367: b5b6cdc v: v3
1 parent 0a9f544 commit d679078

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: f5f2f763395c3336b739866927a56edfbd1f204b
2+
refs/heads/master: c80255e51076239163914c696aad2af6dff8e6e9

trunk/src/lib/fs.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,13 @@ fn dirname(path p) -> path {
1313
assert (_str.byte_len(sep) == 1u);
1414
let int i = _str.rindex(p, sep.(0));
1515
if (i == -1) {
16-
ret p;
16+
// FIXME: the '/' character is a path separator on all 3 platforms we
17+
// support. This should probably be generalized a bit more in the
18+
// future, but for now this should work.
19+
i = _str.rindex(p, '/');
20+
if (i == -1) {
21+
ret p;
22+
}
1723
}
1824
ret _str.substr(p, 0u, i as uint);
1925
}

0 commit comments

Comments
 (0)