Skip to content

Commit

Permalink
more efficient
Browse files Browse the repository at this point in the history
  • Loading branch information
RiskyMH committed Feb 8, 2025
1 parent 573e0c3 commit 5dc56f5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cli/pack_command.zig
Original file line number Diff line number Diff line change
Expand Up @@ -1356,10 +1356,10 @@ pub const PackCommand = struct {
var includes: std.ArrayListUnmanaged(Pattern) = .{};
defer includes.deinit(ctx.allocator);

var path_buf: PathBuffer = undefined;
var files_array = _files_array;
while (files_array.next()) |files_entry| {
if (files_entry.asString(ctx.allocator)) |file_entry_str| {
var path_buf: PathBuffer = undefined;
const normalized = bun.path.normalizeBuf(file_entry_str, &path_buf, .posix);
const parsed = try Pattern.fromUTF8(ctx.allocator, try ctx.allocator.dupe(u8, normalized)) orelse continue;
try includes.append(ctx.allocator, parsed);
Expand Down

0 comments on commit 5dc56f5

Please sign in to comment.