windows: random things (#9046)

* random things

* fix reliability of loading napi stuff

* fix posix build

* a
This commit is contained in:
dave caruso
2024-02-27 16:30:34 -08:00
committed by GitHub
parent c9b5191fc2
commit c54844b30b
11 changed files with 97 additions and 38 deletions

View File

@@ -1709,15 +1709,19 @@ pub const VirtualMachine = struct {
const buster_name = name: {
if (std.fs.path.isAbsolute(normalized_specifier)) {
if (std.fs.path.dirname(normalized_specifier)) |dir| {
// With trailing slash
break :name if (dir.len == 1) dir else normalized_specifier[0 .. dir.len + 1];
// Normalized with trailing slash
break :name bun.strings.normalizeSlashesOnly(
&specifier_cache_resolver_buf,
if (dir.len == 1) dir else normalized_specifier[0 .. dir.len + 1],
'/',
);
}
}
var parts = [_]string{
source_to_use,
normalized_specifier,
"../",
bun.pathLiteral("../"),
};
break :name bun.path.joinAbsStringBufZTrailingSlash(