| ... | ... | @@ -1189,9 +1189,9 @@ fn unpackTarball(f: *Fetch, out_dir: fs.Dir, reader: anytype) RunError!UnpackRes |
| 1189 | 1189 | try res.rootErrorMessage("unable to unpack tarball"); |
| 1190 | 1190 | for (diagnostics.errors.items) |item| { |
| 1191 | 1191 | switch (item) { |
| 1192 | | .unable_to_create_file => |i| try res.unableToCreateFile(i.file_name, i.code), |
| 1193 | | .unable_to_create_sym_link => |i| try res.unableToCreateSymLink(i.file_name, i.link_name, i.code), |
| 1194 | | .unsupported_file_type => |i| try res.unsupportedFileType(i.file_name, @intFromEnum(i.file_type)), |
| 1192 | .unable_to_create_file => |i| try res.unableToCreateFile(stripRoot(i.file_name, res.root_dir), i.code), |
| 1193 | .unable_to_create_sym_link => |i| try res.unableToCreateSymLink(stripRoot(i.file_name, res.root_dir), i.link_name, i.code), |
| 1194 | .unsupported_file_type => |i| try res.unsupportedFileType(stripRoot(i.file_name, res.root_dir), @intFromEnum(i.file_type)), |
| 1195 | 1195 | } |
| 1196 | 1196 | } |
| 1197 | 1197 | } |
| ... | ... | @@ -1764,13 +1764,13 @@ const UnpackResult = struct { |
| 1764 | 1764 | file_type: u8, |
| 1765 | 1765 | }, |
| 1766 | 1766 | |
| 1767 | | fn excluded(self: Error, filter: Filter, root_dir: []const u8) bool { |
| 1767 | fn excluded(self: Error, filter: Filter) bool { |
| 1768 | 1768 | const file_name = switch (self) { |
| 1769 | 1769 | .unable_to_create_file => |info| info.file_name, |
| 1770 | 1770 | .unable_to_create_sym_link => |info| info.file_name, |
| 1771 | 1771 | .unsupported_file_type => |info| info.file_name, |
| 1772 | 1772 | }; |
| 1773 | | return !filter.includePath(stripRoot(file_name, root_dir)); |
| 1773 | return !filter.includePath(file_name); |
| 1774 | 1774 | } |
| 1775 | 1775 | |
| 1776 | 1776 | fn free(self: Error, allocator: std.mem.Allocator) void { |
| ... | ... | @@ -1835,7 +1835,7 @@ const UnpackResult = struct { |
| 1835 | 1835 | while (i > 0) { |
| 1836 | 1836 | i -= 1; |
| 1837 | 1837 | const item = self.errors.items[i]; |
| 1838 | | if (item.excluded(filter, self.root_dir)) { |
| 1838 | if (item.excluded(filter)) { |
| 1839 | 1839 | _ = self.errors.swapRemove(i); |
| 1840 | 1840 | item.free(self.allocator); |
| 1841 | 1841 | } |
| ... | ... | @@ -1867,21 +1867,21 @@ const UnpackResult = struct { |
| 1867 | 1867 | .unable_to_create_sym_link => |info| { |
| 1868 | 1868 | eb.extra.items[note_i] = @intFromEnum(try eb.addErrorMessage(.{ |
| 1869 | 1869 | .msg = try eb.printString("unable to create symlink from '{s}' to '{s}': {s}", .{ |
| 1870 | | stripRoot(info.file_name, self.root_dir), info.link_name, @errorName(info.code), |
| 1870 | info.file_name, info.link_name, @errorName(info.code), |
| 1871 | 1871 | }), |
| 1872 | 1872 | })); |
| 1873 | 1873 | }, |
| 1874 | 1874 | .unable_to_create_file => |info| { |
| 1875 | 1875 | eb.extra.items[note_i] = @intFromEnum(try eb.addErrorMessage(.{ |
| 1876 | 1876 | .msg = try eb.printString("unable to create file '{s}': {s}", .{ |
| 1877 | | stripRoot(info.file_name, self.root_dir), @errorName(info.code), |
| 1877 | info.file_name, @errorName(info.code), |
| 1878 | 1878 | }), |
| 1879 | 1879 | })); |
| 1880 | 1880 | }, |
| 1881 | 1881 | .unsupported_file_type => |info| { |
| 1882 | 1882 | eb.extra.items[note_i] = @intFromEnum(try eb.addErrorMessage(.{ |
| 1883 | 1883 | .msg = try eb.printString("file '{s}' has unsupported type '{c}'", .{ |
| 1884 | | stripRoot(info.file_name, self.root_dir), info.file_type, |
| 1884 | info.file_name, info.file_type, |
| 1885 | 1885 | }), |
| 1886 | 1886 | })); |
| 1887 | 1887 | }, |