diff --git a/crates/compiler/build/src/program.rs b/crates/compiler/build/src/program.rs index 28f959caaaf..9f1e32ddb6c 100644 --- a/crates/compiler/build/src/program.rs +++ b/crates/compiler/build/src/program.rs @@ -855,7 +855,8 @@ fn build_loaded_file<'a>( let last = path.as_os_str().encode_wide().last(); - last == Some('/') || last == Some('\\'); + last == Some(0x002f)// UTF-16 slash + || last == Some(0x005c) // UTF-16 backslash } };