bun install progress

This commit is contained in:
Jarred Sumner
2023-09-06 04:18:14 -08:00
parent caa3ff71fe
commit 5fb23b9296
14 changed files with 226 additions and 51 deletions

View File

@@ -1615,6 +1615,12 @@ pub fn toNTPath(wbuf: []u16, utf8: []const u8) [:0]const u16 {
// These are the same because they don't have rules like needing a trailing slash
pub const toNTDir = toNTPath;
pub fn toExtendedPathNormalized(wbuf: []u16, utf8: []const u8) [:0]const u16 {
std.debug.assert(wbuf.len > 4);
wbuf[0..4].* = [_]u16{ '\\', '\\', '?', '\\' };
return wbuf[0 .. toWPathNormalized(wbuf[4..], utf8).len + 4 :0];
}
pub fn toWPathNormalized(wbuf: []u16, utf8: []const u8) [:0]const u16 {
var renormalized: [bun.MAX_PATH_BYTES]u8 = undefined;
var path_to_use = utf8;