authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-02 17:14:23 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-02 17:14:23 -08:00
logf0ce2a12eb0b54ff59fa7d6ef1ef41e37e5cdc37
tree9eaea245ce2f61ca125174ae1dc73148153a0073
parentf45dbf85435f6fc4557aecf575d0587c498fe20e

collect_deps- make http folow principle 2 better


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

src/common.zig+5-1
......@@ -79,10 +79,14 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec
7979 }
8080 const file_name = try u.last(try u.split(d.path, "/"));
8181 if (d.version.len > 0) {
82 if (try u.does_folder_exist(pv)) {
83 moddir = pv;
84 break :blk;
85 }
8286 const file_path = try std.fs.path.join(gpa, &.{pv, file_name});
8387 try d.type.pull(d.path, pv);
8488 if (try u.validate_hash(try u.last(try u.split(pv, "/")), file_path)) {
85 try std.fs.deleteFileAbsolute(file_path);
89 try std.fs.cwd().deleteFile(file_path);
8690 moddir = pv;
8791 break :blk;
8892 }