authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-19 00:38:23 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-19 00:38:23 -07:00
log4ebb7c89cd13be71cec8c4789710292ce4fbf492
treeb6774adae43d861ad20745860a6a2d4a91792723
parent1ff771e82c1aad0bbf441961410b71f0c19d6ab0

cap hash folder path length for easier debugging


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

src/common.zig+1-1
......@@ -85,7 +85,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec
8585 }
8686 const file_path = try std.fs.path.join(gpa, &.{pv, file_name});
8787 try d.type.pull(d.path, pv);
88 if (try u.validate_hash(try u.last(try u.split(pv, "/")), file_path)) {
88 if (try u.validate_hash(d.version, file_path)) {
8989 try std.fs.cwd().deleteFile(file_path);
9090 moddir = pv;
9191 break :blk;
src/util/dep.zig+1-1
......@@ -37,7 +37,7 @@ pub const Dep = struct {
3737
3838 pub fn clean_path_v(self: Dep) ![]const u8 {
3939 if (self.type == .http and self.version.len > 0) {
40 return std.mem.join(gpa, "/", &.{"v", @tagName(self.type), self.version});
40 return std.mem.join(gpa, "/", &.{"v", @tagName(self.type), self.version[0..20]});
4141 }
4242 return std.mem.join(gpa, "/", &.{"v", try self.clean_path(), self.version});
4343 }