Convert fs::path_is_absolute internals to istrs. Issue #855

This commit is contained in:
Brian Anderson 2011-08-31 16:38:09 -07:00
parent cc08fd1ef9
commit a45068cf27
3 changed files with 5 additions and 5 deletions

View file

@ -61,7 +61,7 @@ fn list_dir(p: &path) -> [istr] {
}
fn path_is_absolute(p: &path) -> bool {
ret os_fs::path_is_absolute(istr::to_estr(p));
ret os_fs::path_is_absolute(p);
}
// FIXME: under Windows, we should prepend the current drive letter to paths

View file

@ -32,7 +32,7 @@ fn list_dir(path: str) -> [str] {
}
fn path_is_absolute(p: str) -> bool { ret str::char_at(p, 0u) == '/'; }
fn path_is_absolute(p: &istr) -> bool { ret istr::char_at(p, 0u) == '/'; }
const path_sep: char = '/';

View file

@ -7,9 +7,9 @@ native "rust" mod rustrt {
fn list_dir(path: str) -> [str] { ret *rustrt::rust_list_files(path + "*"); }
fn path_is_absolute(p: str) -> bool {
ret str::char_at(p, 0u) == '/' ||
str::char_at(p, 1u) == ':' && str::char_at(p, 2u) == '\\';
fn path_is_absolute(p: &istr) -> bool {
ret istr::char_at(p, 0u) == '/' ||
istr::char_at(p, 1u) == ':' && istr::char_at(p, 2u) == '\\';
}
/* FIXME: win32 path handling actually accepts '/' or '\' and has subtly