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 9873553 commit 67a830cCopy full SHA for 67a830c
[refs]
@@ -1,2 +1,2 @@
1
---
2
-refs/heads/master: 85bcf75da1a09fe52ce851ff8a288f0a819900d3
+refs/heads/master: da0e961f615376537dee070273751fa4f4850a2e
trunk/src/lib/fs.rs
@@ -22,10 +22,11 @@ fn dirname(path p) -> path {
22
// FIXME: Need some typestate to avoid bounds check when len(pre) == 0
23
fn connect(path pre, path post) -> path {
24
auto len = str::byte_len(pre);
25
- if (pre.(len - 1u) == (os_fs::path_sep as u8)) { // Trailing '/'?
26
- ret pre + post;
27
- }
28
- ret pre + path_sep() + post;
+ ret if (pre.(len - 1u) == (os_fs::path_sep as u8)) { // Trailing '/'?
+ pre + post
+ } else {
+ pre + path_sep() + post
29
+ };
30
}
31
32
fn file_is_dir(path p) -> bool {
0 commit comments