From 43b1b977f46236856ff020ae67ed2cbf230e8c1e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Krzysztof=20Wi=C5=9Bniewski?= Date: Wed, 5 Mar 2025 19:57:31 +0100 Subject: [PATCH] Fix conflict with master (#1154) --- src/assets.zig | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/src/assets.zig b/src/assets.zig index 4ebd2423..2b9135b8 100644 --- a/src/assets.zig +++ b/src/assets.zig @@ -158,34 +158,6 @@ pub fn readAllZonFilesInAddons( } } } -/// Reads text files recursively from all subfolders. -pub fn readAllFilesInAddons(externalAllocator: NeverFailingAllocator, addons: main.List(std.fs.Dir), subPath: []const u8, output: *main.List([]const u8)) void { - for(addons.items) |addon| { - var dir = addon.openDir(subPath, .{.iterate = true}) catch |err| { - if(err != error.FileNotFound) { - std.log.err("Could not open addon directory {s}: {s}", .{subPath, @errorName(err)}); - } - continue; - }; - defer dir.close(); - - var walker = dir.walk(main.stackAllocator.allocator) catch unreachable; - defer walker.deinit(); - - while(walker.next() catch |err| blk: { - std.log.err("Got error while iterating addon directory {s}: {s}", .{subPath, @errorName(err)}); - break :blk null; - }) |entry| { - if(entry.kind == .file) { - const string = dir.readFileAlloc(externalAllocator.allocator, entry.path, std.math.maxInt(usize)) catch |err| { - std.log.err("Could not open {s}/{s}: {s}", .{subPath, entry.path, @errorName(err)}); - continue; - }; - output.append(string); - } - } - } -} /// Reads obj files recursively from all subfolders. pub fn readAllObjFilesInAddonsHashmap(