We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a9f544 commit d679078Copy full SHA for d679078
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: f5f2f763395c3336b739866927a56edfbd1f204b
+refs/heads/master: c80255e51076239163914c696aad2af6dff8e6e9
trunk/src/lib/fs.rs
@@ -13,7 +13,13 @@ fn dirname(path p) -> path {
13
assert (_str.byte_len(sep) == 1u);
14
let int i = _str.rindex(p, sep.(0));
15
if (i == -1) {
16
- ret p;
+ // 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
+ }
23
}
24
ret _str.substr(p, 0u, i as uint);
25
0 commit comments