Convert fs::path_is_absolute internals to istrs. Issue #855
This commit is contained in:
parent
cc08fd1ef9
commit
a45068cf27
3 changed files with 5 additions and 5 deletions
|
@ -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
|
||||
|
|
|
@ -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 = '/';
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue