| ... | @@ -79,10 +79,14 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec | ... | @@ -79,10 +79,14 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec |
| 79 | } | 79 | } |
| 80 | const file_name = try u.last(try u.split(d.path, "/")); | 80 | const file_name = try u.last(try u.split(d.path, "/")); |
| 81 | if (d.version.len > 0) { | 81 | if (d.version.len > 0) { |
| | 82 | if (try u.does_folder_exist(pv)) { |
| | 83 | moddir = pv; |
| | 84 | break :blk; |
| | 85 | } |
| 82 | const file_path = try std.fs.path.join(gpa, &.{pv, file_name}); | 86 | const file_path = try std.fs.path.join(gpa, &.{pv, file_name}); |
| 83 | try d.type.pull(d.path, pv); | 87 | try d.type.pull(d.path, pv); |
| 84 | if (try u.validate_hash(try u.last(try u.split(pv, "/")), file_path)) { | 88 | 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); |
| 86 | moddir = pv; | 90 | moddir = pv; |
| 87 | break :blk; | 91 | break :blk; |
| 88 | } | 92 | } |