c3c
c3c copied to clipboard
`std::io::path` - `.` is not a directory
On linux-x64, p.str_view() returns blank, path::is_dir(p) returns false.
import std::io;
fn void! main(String[] argv)
{
Path! p = path::new(".");
if (catch p)
{
io::eprintn("path::new() failed.");
return;
}
io::printfn("'%s' is a directory: %s.", p.str_view(), path::is_dir(p));
}
I need to do some research on how to best make this work correct on both Win and Posix
What is the desired behaviour? If we think about things like appending and defining such a path. Should there be an "empty path"("") as well as "current path" (".")?
This should be fixed in dev now.
it works