Skip to content

Commit

Permalink
Do not assert valid windows path in chdirOSPath because the `SetCurre…
Browse files Browse the repository at this point in the history
…ntDirectoryW` function will validate the path
  • Loading branch information
Jarred-Sumner committed Jan 1, 2025
1 parent 1919165 commit be959e1
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/sys.zig
Original file line number Diff line number Diff line change
Expand Up @@ -506,8 +506,6 @@ pub fn chmod(path: [:0]const u8, mode: bun.Mode) Maybe(void) {
}

pub fn chdirOSPath(destination: bun.OSPathSliceZ) Maybe(void) {
assertIsValidWindowsPath(bun.OSPathChar, destination);

if (comptime Environment.isPosix) {
const rc = syscall.chdir(destination);
return Maybe(void).errnoSys(rc, .chdir) orelse Maybe(void).success;
Expand Down

0 comments on commit be959e1

Please sign in to comment.