about summary refs log tree commit diff
path: root/src/lib
diff options
context:
space:
mode:
authorBrian Anderson <banderson@mozilla.com>2011-09-01 12:58:24 -0700
committerBrian Anderson <banderson@mozilla.com>2011-09-01 13:16:44 -0700
commit8f531e769a025859eeebf6e99c50c4b786fb0814 (patch)
tree888b07a3c1186f4e0db934bc33605e76b3fbae4a /src/lib
parentbaa1e8790d6c8d04de5a371a1c231ca9f2caa3b0 (diff)
downloadrust-8f531e769a025859eeebf6e99c50c4b786fb0814.tar.gz
rust-8f531e769a025859eeebf6e99c50c4b786fb0814.zip
Convert rust_file_is_dir from estrs to cstrs. Issue #855
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/fs.rs6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/lib/fs.rs b/src/lib/fs.rs
index 0e9dc591756..922d01e841b 100644
--- a/src/lib/fs.rs
+++ b/src/lib/fs.rs
@@ -4,7 +4,7 @@ import os_fs;
 import str;
 
 native "rust" mod rustrt {
-    fn rust_file_is_dir(path: str) -> int;
+    fn rust_file_is_dir(path: istr::sbuf) -> int;
 }
 
 fn path_sep() -> istr { ret istr::from_char(os_fs::path_sep); }
@@ -43,7 +43,9 @@ fn connect(pre: &path, post: &path) -> path {
 }
 
 fn file_is_dir(p: &path) -> bool {
-    ret rustrt::rust_file_is_dir(istr::to_estr(p)) != 0;
+    ret istr::as_buf(p, { |buf|
+        rustrt::rust_file_is_dir(buf) != 0
+    });
 }
 
 fn list_dir(p: &path) -> [istr] {