Skip to content

Path logic broken with NODERAWFS on Windows #27744

Description

@stevenwdv

On Windows with NODERAWFS, directory separators are \ and paths start with \\ or a drive letter. However, the stdlib assumes Unix paths. This means most operations on paths don't work correctly.

For example:

#include <filesystem>
#include <iostream>

int main() {
  std::filesystem::path p = R"(C:\Users\me)";
  std::clog << p.parent_path() << '\n';
  std::clog << p.root_path() << '\n';
  std::clog << std::boolalpha << p.is_absolute() << '\n';
  std::clog << absolute(p) << '\n';
}

Under Emscripten with NODERAWFS on Windows:

""
""
false
"C:\\current\\directory/C:\\Users\\me"

Expected/regular outcome on Windows:

"C:\\Users"
"C:\\"
true
"C:\\Users\\me"

Related to: #25291, #17829.

This means that for us, NODERAWFS is not usable on Windows (see e.g. #25291 (comment)). However, I understand this may be hard to fix, and a.t.m. we don't really need it per se.

Version: Emscripten 6.0.9 + fix for #25291.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions