refactor(infra): share windows path normalization helper

This commit is contained in:
Peter Steinberger
2026-03-02 21:55:03 +00:00
parent 55a2d12f40
commit 6358aae024
2 changed files with 2 additions and 12 deletions

View File

@@ -3,7 +3,7 @@ import path from "node:path";
const NOT_FOUND_CODES = new Set(["ENOENT", "ENOTDIR"]);
const SYMLINK_OPEN_CODES = new Set(["ELOOP", "EINVAL", "ENOTSUP"]);
function normalizeWindowsPathForComparison(input: string): string {
export function normalizeWindowsPathForComparison(input: string): string {
let normalized = path.win32.normalize(input);
if (normalized.startsWith("\\\\?\\")) {
normalized = normalized.slice(4);