extension_host: Replace backslashes with forward slashes for cwd on Windows (#38072)
Instead of passing CWD verbatim from the Windows host with backslashes and all, we now rewrite it into a more POSIX-happy format featuring forward slashes which means `std::path::Path` operations now work within WASI with Windows-style paths. Release Notes: - N/A
This commit is contained in:
@@ -18,6 +18,10 @@ impl TestExtension {
|
||||
|
||||
let current_dir = std::env::current_dir().unwrap();
|
||||
println!("current_dir: {}", current_dir.display());
|
||||
assert_eq!(
|
||||
current_dir.file_name().unwrap().to_str().unwrap(),
|
||||
"test-extension"
|
||||
);
|
||||
|
||||
fs::create_dir_all(current_dir.join("dir-created-with-abs-path")).unwrap();
|
||||
fs::create_dir_all("./dir-created-with-rel-path").unwrap();
|
||||
|
||||
Reference in New Issue
Block a user