authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-12 10:43:27-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2023-10-12 10:47:22-07:00
log1d1e5a86174940b2260d475c96c2dca4b6bbbef3
tree0bf8ccaada0b213abe0117f2e81e0c07f6b1b8ee
parent8c6b0271cc55d4c9ae2793340419df3fd3d2c1d7

Package.Fetch: fix empty path and "." not including all

Related to #17491

1 files changed, 2 insertions(+), 0 deletions(-)

src/Package/Fetch.zig+2
......@@ -1507,6 +1507,7 @@ const Filter = struct {
15071507 pub fn includePath(self: Filter, sub_path: []const u8) bool {
15081508 if (self.include_paths.count() == 0) return true;
15091509 if (self.include_paths.contains("")) return true;
1510 if (self.include_paths.contains(".")) return true;
15101511 if (self.include_paths.contains(sub_path)) return true;
15111512
15121513 // Check if any included paths are parent directories of sub_path.
......@@ -1571,4 +1572,5 @@ const ErrorBundle = std.zig.ErrorBundle;
15711572
15721573test {
15731574 _ = Filter;
1575 _ = FileType;
15741576}