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 {
6666 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-leven", "014971d4b1e327a5c61322c3a6b9369fd1863864").step);
6767 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "bc1cd51625c13d6c7df819fd0d85968e617f5c57").step);
6868 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);
7070 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);
7272 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);
7474 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-netbsd", "5ad432ca421c59099be3630b9d0dda49e8bef0a7").step);
7575 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-sys-openbsd", "1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c357").step);
7676 step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "cacde79ed6c866a370dd58f97ed1baa31b0b2c35").step);
......@@ -235,9 +235,9 @@ pub const package_data = struct {
235235 .entry = "/git/github.com/nektro/zig-licenses-text/a9d067c3c4d6c226a1de5531b66785bc15d869ee/src/lib.zig",
236236 };
237237 pub var _73bukkeci2u6 = Package{
238 .store = "/git/github.com/nektro/zig-sys-darwin/b96e8bad94f53d5f426a32f237d9e8346f51b8f2",
238 .store = "/git/github.com/nektro/zig-sys-darwin/b349aa32b55aae4cf2ae56740003f8aff0394920",
239239 .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",
241241 };
242242 pub var _qfev2g50alvp = Package{
243243 .store = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60",
......@@ -245,9 +245,9 @@ pub const package_data = struct {
245245 .entry = "/git/github.com/nektro/zig-sys-freebsd/a80eaba4499e56256ed2d42959fed5174b1fbf60/freebsd.zig",
246246 };
247247 pub var _h7tv7ayhffak = Package{
248 .store = "/git/github.com/nektro/zig-sys-linux/1b61f4f86230a8980f3b7f30c5876b09064a5a09",
248 .store = "/git/github.com/nektro/zig-sys-linux/24cc89eb39fbb1f8b4caa53beeca1c785ce78546",
249249 .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",
251251 };
252252 pub var _uvkgl6xf1azv = Package{
253253 .store = "/git/github.com/nektro/zig-sys-netbsd/5ad432ca421c59099be3630b9d0dda49e8bef0a7",
......@@ -278,9 +278,9 @@ pub const package_data = struct {
278278 .deps = &[_]*Package{ &_f7dubzb7cyqe, &_h7tv7ayhffak, &_73bukkeci2u6, &_kscsl0145t7x, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
279279 };
280280 pub var _vph9l0hxpeze = Package{
281 .store = "/git/github.com/nektro/zig-nfs/ca10dac88432ed0145b43d47c27a04ad7e4858c9",
281 .store = "/git/github.com/nektro/zig-nfs/1163f0e7be1400c7e2f80b5719114a7d1dc2cd36",
282282 .name = "nfs",
283 .entry = "/git/github.com/nektro/zig-nfs/ca10dac88432ed0145b43d47c27a04ad7e4858c9/nfs.zig",
283 .entry = "/git/github.com/nektro/zig-nfs/1163f0e7be1400c7e2f80b5719114a7d1dc2cd36/nfs.zig",
284284 .deps = &[_]*Package{ &_h7tv7ayhffak, &_kscsl0145t7x, &_iecwp4b3bsfm, &_73bukkeci2u6, &_qfev2g50alvp, &_uvkgl6xf1azv, &_4rmxgmcykiba },
285285 };
286286 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.
316316 if (p.type == .DIR) {
317317 continue;
318318 }
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 }
319339 const path = try alloc.dupe(u8, p.path);
320340 try map.put(path, try nio.fmt.allocPrint(alloc, "{s}/{s}", .{ dir_path, path }));
321341 }
zigmod.lock+3-3
......@@ -11,11 +11,11 @@ git https://github.com/nektro/zig-json commit-60425cbb04ce4b00edfad895771e5bd402
1111git https://github.com/nektro/zig-leven commit-014971d4b1e327a5c61322c3a6b9369fd1863864
1212git https://github.com/nektro/zig-licenses commit-bc1cd51625c13d6c7df819fd0d85968e617f5c57
1313git https://github.com/nektro/zig-licenses-text commit-a9d067c3c4d6c226a1de5531b66785bc15d869ee
14git https://github.com/nektro/zig-nfs commit-ca10dac88432ed0145b43d47c27a04ad7e4858c9
14git https://github.com/nektro/zig-nfs commit-1163f0e7be1400c7e2f80b5719114a7d1dc2cd36
1515git https://github.com/nektro/zig-nio commit-61cf2b1af033a83ec2137e21824a8afa01318388
16git https://github.com/nektro/zig-sys-darwin commit-b96e8bad94f53d5f426a32f237d9e8346f51b8f2
16git https://github.com/nektro/zig-sys-darwin commit-b349aa32b55aae4cf2ae56740003f8aff0394920
1717git https://github.com/nektro/zig-sys-freebsd commit-a80eaba4499e56256ed2d42959fed5174b1fbf60
18git https://github.com/nektro/zig-sys-linux commit-1b61f4f86230a8980f3b7f30c5876b09064a5a09
18git https://github.com/nektro/zig-sys-linux commit-24cc89eb39fbb1f8b4caa53beeca1c785ce78546
1919git https://github.com/nektro/zig-sys-netbsd commit-5ad432ca421c59099be3630b9d0dda49e8bef0a7
2020git https://github.com/nektro/zig-sys-openbsd commit-1a77f0cfe55b5fdfa6ac2bedf587bb3b8015c357
2121git https://github.com/nektro/zig-time commit-cacde79ed6c866a370dd58f97ed1baa31b0b2c35