| ... | @@ -1416,7 +1416,8 @@ fn computeHash( | ... | @@ -1416,7 +1416,8 @@ fn computeHash( |
| 1416 | }) |entry| { | 1416 | }) |entry| { |
| 1417 | if (entry.kind == .directory) continue; | 1417 | if (entry.kind == .directory) continue; |
| 1418 | | 1418 | |
| 1419 | if (!filter.includePath(entry.path)) { | 1419 | const entry_pkg_path = stripRoot(entry.path, pkg_path.sub_path); |
| | 1420 | if (!filter.includePath(entry_pkg_path)) { |
| 1420 | // Delete instead of including in hash calculation. | 1421 | // Delete instead of including in hash calculation. |
| 1421 | const fs_path = try arena.dupe(u8, entry.path); | 1422 | const fs_path = try arena.dupe(u8, entry.path); |
| 1422 | | 1423 | |
| ... | @@ -1454,7 +1455,7 @@ fn computeHash( | ... | @@ -1454,7 +1455,7 @@ fn computeHash( |
| 1454 | const hashed_file = try arena.create(HashedFile); | 1455 | const hashed_file = try arena.create(HashedFile); |
| 1455 | hashed_file.* = .{ | 1456 | hashed_file.* = .{ |
| 1456 | .fs_path = fs_path, | 1457 | .fs_path = fs_path, |
| 1457 | .normalized_path = try normalizePathAlloc(arena, stripRoot(fs_path, pkg_path.sub_path)), | 1458 | .normalized_path = try normalizePathAlloc(arena, entry_pkg_path), |
| 1458 | .kind = kind, | 1459 | .kind = kind, |
| 1459 | .hash = undefined, // to be populated by the worker | 1460 | .hash = undefined, // to be populated by the worker |
| 1460 | .failure = undefined, // to be populated by the worker | 1461 | .failure = undefined, // to be populated by the worker |
| ... | @@ -1657,9 +1658,9 @@ fn stripRoot(fs_path: []const u8, root_dir: []const u8) []const u8 { | ... | @@ -1657,9 +1658,9 @@ fn stripRoot(fs_path: []const u8, root_dir: []const u8) []const u8 { |
| 1657 | | 1658 | |
| 1658 | /// Make a file system path identical independently of operating system path inconsistencies. | 1659 | /// Make a file system path identical independently of operating system path inconsistencies. |
| 1659 | /// This converts backslashes into forward slashes. | 1660 | /// This converts backslashes into forward slashes. |
| 1660 | fn normalizePathAlloc(arena: Allocator, fs_path: []const u8) ![]const u8 { | 1661 | fn normalizePathAlloc(arena: Allocator, pkg_path: []const u8) ![]const u8 { |
| 1661 | if (fs.path.sep == canonical_sep) return fs_path; | 1662 | const normalized = try arena.dupe(u8, pkg_path); |
| 1662 | const normalized = try arena.dupe(u8, fs_path); | 1663 | if (fs.path.sep == canonical_sep) return normalized; |
| 1663 | normalizePath(normalized); | 1664 | normalizePath(normalized); |
| 1664 | return normalized; | 1665 | return normalized; |
| 1665 | } | 1666 | } |