mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
get more bundler tests passing on windows (#8560)
* get test/bundler/bundler_naming.test.ts passing on windows * move platformToPosixInPlace to bun.path and use the vector'd version * only resolve rel_path if it contains '/./', most of the time './' needs to be preserved * fix another file too * move kernel32 extern to better location * [autofix.ci] apply automated fixes * use bun.path.posixToPlatformInPlace here * rewrite this whole section to stay in utf16 and handle errors * remove dead comments * fix a typo * undo these relative changes * preserve path.pretty from getting lost * use bun's instead of zig's resolve here * both side of this loop need the inplace normal * use existing generic dirname function * make path inplace functions generic * we might need to modify this so copy on windows Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * don't assume the prefix we get from this * more robust path traversal * don't mangle absolute paths * do this bit in a loop * this line is a u16 * dont forget to compile before pushing * this was wrong * look into this later * check pointer math first since its faster * posix syscalls support path traversal, don't do the work for them * its already inside stable, no need to change * used the online editor --------- Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: Jarred Sumner <jarred@jarredsumner.com>
This commit is contained in:
@@ -1726,7 +1726,7 @@ 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{ '\\', '\\', '?', '\\' };
|
||||
wbuf[0..4].* = bun.windows.nt_maxpath_prefix;
|
||||
return wbuf[0 .. toWPathNormalized(wbuf[4..], utf8).len + 4 :0];
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user