authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-01 23:02:27-07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2026-09-01 23:02:27-07:00
logf843aa9b707c82b9ce58d46b0410a47963940a2b
tree7161e1b85863263ec49311c7baf0d67e5bbeea4d
parent441e0461738ff9b64fe58e0ab7fd7c955a43a525
signature Signed by SSH key SHA256:4hHJbtBRU58AYXwjL7fkz2fnQHdiye8x1QpTCQ0sHNw

files.zig: when a file is a link to a directory, walk it


3 files changed, 32 insertions(+), 12 deletions(-)

deps.zig+9-9
...@@ -66,11 +66,11 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {...@@ -66,11 +66,11 @@ pub fn fetch(exe: *std.Build.Step.Compile) *std.Build.Step {
66 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "014971d4b1e327a5c61322c3a6b9369fd1863864").step);66 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "014971d4b1e327a5c61322c3a6b9369fd1863864").step);
67 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "bc1cd51625c13d6c7df819fd0d85968e617f5c57").step);67 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "bc1cd51625c13d6c7df819fd0d85968e617f5c57").step);
68 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "a9d067c3c4d6c226a1de5531b66785bc15d869ee").step);68 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "a9d067c3c4d6c226a1de5531b66785bc15d869ee").step);
69 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "ca10dac88432ed0145b43d47c27a04ad7e4858c9").step);69 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nfs", "1163f0e7be1400c7e2f80b5719114a7d1dc2cd36").step);
70 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "61cf2b1af033a83ec2137e21824a8afa01318388").step);70 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-nio", "61cf2b1af033a83ec2137e21824a8afa01318388").step);
71 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "b96e8bad94f53d5f426a32f237d9e8346f51b8f2").step);71 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-darwin", "b349aa32b55aae4cf2ae56740003f8aff0394920").step);
72 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-freebsd", "a80eaba4499e56256ed2d42959fed5174b1fbf60").step);72 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-freebsd", "a80eaba4499e56256ed2d42959fed5174b1fbf60").step);
73 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "1b61f4f86230a8980f3b7f30c5876b09064a5a09").step);73 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-linux", "24cc89eb39fbb1f8b4caa53beeca1c785ce78546").step);
74 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-netbsd", "5ad432ca421c59099be3630b9d0dda49e8bef0a7").step);74 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-netbsd", "5ad432ca421c59099be3630b9d0dda49e8bef0a7").step);
75 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-openbsd", "1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c357").step);75 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-openbsd", "1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c357").step);
76 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "cacde79ed6c866a370dd58f97ed1baa31b0b2c35").step);76 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "cacde79ed6c866a370dd58f97ed1baa31b0b2c35").step);
...@@ -235,9 +235,9 @@ pub const package_data = struct {...@@ -235,9 +235,9 @@ pub const package_data = struct {
235 .entry = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee/src/lib.zig",235 .entry = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee/src/lib.zig",
236 };236 };
237 pub var _73bukkeci2u6 = Package{237 pub var _73bukkeci2u6 = Package{
238 .store = "/git/github.com/nektro/zig-sys-darwin/b96e8bad94f53d5f426a32f237d9e8346f51b8f2",238 .store = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920",
239 .name = "sys-darwin",239 .name = "sys-darwin",
240 .entry = "/git/github.com/nektro/zig-sys-darwin/b96e8bad94f53d5f426a32f237d9e8346f51b8f2/sys_darwin.zig",240 .entry = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920/sys_darwin.zig",
241 };241 };
242 pub var _qfev2g50alvp = Package{242 pub var _qfev2g50alvp = Package{
243 .store = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60",243 .store = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60",
...@@ -245,9 +245,9 @@ pub const package_data = struct {...@@ -245,9 +245,9 @@ pub const package_data = struct {
245 .entry = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60/freebsd.zig",245 .entry = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60/freebsd.zig",
246 };246 };
247 pub var _h7tv7ayhffak = Package{247 pub var _h7tv7ayhffak = Package{
248 .store = "/git/github.com/nektro/zig-sys-linux/1b61f4f86230a8980f3b7f30c5876b09064a5a09",248 .store = "/git/github.com/nektro/zig-sys-linux/24cc89eb39fbb1f8b4caa53beeca1c785ce78546",
249 .name = "sys-linux",249 .name = "sys-linux",
250 .entry = "/git/github.com/nektro/zig-sys-linux/1b61f4f86230a8980f3b7f30c5876b09064a5a09/mod.zig",250 .entry = "/git/github.com/nektro/zig-sys-linux/24cc89eb39fbb1f8b4caa53beeca1c785ce78546/mod.zig",
251 };251 };
252 pub var _uvkgl6xf1azv = Package{252 pub var _uvkgl6xf1azv = Package{
253 .store = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7",253 .store = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7",
...@@ -278,9 +278,9 @@ pub const package_data = struct {...@@ -278,9 +278,9 @@ pub const package_data = struct {
278 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6, &_kscsl0145t7x, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },278 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6, &_kscsl0145t7x, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
279 };279 };
280 pub var _vph9l0hxpeze = Package{280 pub var _vph9l0hxpeze = Package{
281 .store = "/git/github.com/nektro/zig-nfs/ca10dac88432ed0145b43d47c27a04ad7e4858c9",281 .store = "/git/github.com/nektro/zig-nfs/1163f0e7be1400c7e2f80b5719114a7d1dc2cd36",
282 .name = "nfs",282 .name = "nfs",
283 .entry = "/git/github.com/nektro/zig-nfs/ca10dac88432ed0145b43d47c27a04ad7e4858c9/nfs.zig",283 .entry = "/git/github.com/nektro/zig-nfs/1163f0e7be1400c7e2f80b5719114a7d1dc2cd36/nfs.zig",
284 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },284 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
285 };285 };
286 pub var _2ovav391ivak = Package{286 pub var _2ovav391ivak = Package{
src/common.zig+20
...@@ -316,6 +316,26 @@ pub fn gen_files_package(alloc: std.mem.Allocator, cachepath: string, mdir: nfs....@@ -316,6 +316,26 @@ pub fn gen_files_package(alloc: std.mem.Allocator, cachepath: string, mdir: nfs.
316 if (p.type == .DIR) {316 if (p.type == .DIR) {
317 continue;317 continue;
318 }318 }
319 if (p.type == .LNK) {
320 const parent = try dir.openDirC(std.fs.path.dirname(p.path).?, .{});
321 defer parent.close();
322 var buf: [1024]u8 = undefined;
323 const link_path = try dir.readlink(p.path, &buf);
324 const link_stat = try parent.statFile(link_path);
325 if (link_stat.kind() == .DIR) {
326 const link = try parent.openDir(link_path, .{});
327 var walker2 = try link.walk(alloc);
328 defer walker2.deinit();
329 while (try walker2.next()) |p2| {
330 if (p2.type == .DIR) {
331 continue;
332 }
333 const path = try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ p.path, p2.path });
334 try map.put(path, try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path }));
335 }
336 continue;
337 }
338 }
319 const path = try alloc.dupe(u8, p.path);339 const path = try alloc.dupe(u8, p.path);
320 try map.put(path, try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path }));340 try map.put(path, try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path }));
321 }341 }
zigmod.lock+3-3
...@@ -11,11 +11,11 @@ git https://github.com/nektro/zig-json commit-60425cbb04ce4b00edfad895771e5bd402...@@ -11,11 +11,11 @@ git https://github.com/nektro/zig-json commit-60425cbb04ce4b00edfad895771e5bd402
11git https://github.com/nektro/zig-leven commit-014971d4b1e327a5c61322c3a6b9369fd186386411git https://github.com/nektro/zig-leven commit-014971d4b1e327a5c61322c3a6b9369fd1863864
12git https://github.com/nektro/zig-licenses commit-bc1cd51625c13d6c7df819fd0d85968e617f5c5712git https://github.com/nektro/zig-licenses commit-bc1cd51625c13d6c7df819fd0d85968e617f5c57
13git https://github.com/nektro/zig-licenses-text commit-a9d067c3c4d6c226a1de5531b66785bc15d869ee13git https://github.com/nektro/zig-licenses-text commit-a9d067c3c4d6c226a1de5531b66785bc15d869ee
14git https://github.com/nektro/zig-nfs commit-ca10dac88432ed0145b43d47c27a04ad7e4858c914git https://github.com/nektro/zig-nfs commit-1163f0e7be1400c7e2f80b5719114a7d1dc2cd36
15git https://github.com/nektro/zig-nio commit-61cf2b1af033a83ec2137e21824a8afa0131838815git https://github.com/nektro/zig-nio commit-61cf2b1af033a83ec2137e21824a8afa01318388
16git https://github.com/nektro/zig-sys-darwin commit-b96e8bad94f53d5f426a32f237d9e8346f51b8f216git https://github.com/nektro/zig-sys-darwin commit-b349aa32b55aae4cf2ae56740003f8aff0394920
17git https://github.com/nektro/zig-sys-freebsd commit-a80eaba4499e56256ed2d42959fed5174b1fbf6017git https://github.com/nektro/zig-sys-freebsd commit-a80eaba4499e56256ed2d42959fed5174b1fbf60
18git https://github.com/nektro/zig-sys-linux commit-1b61f4f86230a8980f3b7f30c5876b09064a5a0918git https://github.com/nektro/zig-sys-linux commit-24cc89eb39fbb1f8b4caa53beeca1c785ce78546
19git https://github.com/nektro/zig-sys-netbsd commit-5ad432ca421c59099be3630b9d0dda49e8bef0a719git https://github.com/nektro/zig-sys-netbsd commit-5ad432ca421c59099be3630b9d0dda49e8bef0a7
20git https://github.com/nektro/zig-sys-openbsd commit-1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c35720git https://github.com/nektro/zig-sys-openbsd commit-1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c357
21git https://github.com/nektro/zig-time commit-cacde79ed6c866a370dd58f97ed1baa31b0b2c3521git https://github.com/nektro/zig-time commit-cacde79ed6c866a370dd58f97ed1baa31b0b2c35