authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-09 02:45:37 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-08-09 02:45:37 -07:00
log01a784d7b4c12296461adeb8aa157b3579523e42
treee5e99d38ce8a80b14052033a6273661413534d49
parentefc18406c519bcf3de4f1e06022934a03c71370e

fix files package generation for new zig


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

src/common.zig+2-2
...@@ -289,7 +289,7 @@ pub fn add_files_package(pkg_name: []const u8, dirs: []const []const u8, parent_...@@ -289,7 +289,7 @@ pub fn add_files_package(pkg_name: []const u8, dirs: []const []const u8, parent_
289 continue;289 continue;
290 }290 }
291 const path = try std.mem.dupe(gpa, u8, p.path);291 const path = try std.mem.dupe(gpa, u8, p.path);
292 try map.put(path[dir_path.len..], path);292 try map.put(path, try std.fmt.allocPrint(gpa, "{s}/{s}", .{ dir_path, path }));
293 }293 }
294 }294 }
295295
...@@ -304,7 +304,7 @@ pub fn add_files_package(pkg_name: []const u8, dirs: []const []const u8, parent_...@@ -304,7 +304,7 @@ pub fn add_files_package(pkg_name: []const u8, dirs: []const []const u8, parent_
304 );304 );
305 var iter = map.iterator();305 var iter = map.iterator();
306 while (iter.next()) |item| {306 while (iter.next()) |item| {
307 try w.print(" .{{ .@\"0\" = \"{}\", .@\"1\" = @embedFile(\"./../../../{}\") }},\n", .{ std.zig.fmtEscapes(item.key_ptr.*), std.zig.fmtEscapes(item.value_ptr.*) });307 try w.print(" .{{ .@\"0\" = \"/{}\", .@\"1\" = @embedFile(\"./../../../{}\") }},\n", .{ std.zig.fmtEscapes(item.key_ptr.*), std.zig.fmtEscapes(item.value_ptr.*) });
308 }308 }
309 try w.writeAll("\n");309 try w.writeAll("\n");
310 try w.writeAll(310 try w.writeAll(