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...@@ -85,7 +85,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec
85 }85 }
86 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});
87 try d.type.pull(d.path, pv);87 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)) {
89 try std.fs.cwd().deleteFile(file_path);89 try std.fs.cwd().deleteFile(file_path);
90 moddir = pv;90 moddir = pv;
91 break :blk;91 break :blk;
src/util/dep.zig+1-1
...@@ -37,7 +37,7 @@ pub const Dep = struct {...@@ -37,7 +37,7 @@ pub const Dep = struct {
3737
38 pub fn clean_path_v(self: Dep) ![]const u8 {38 pub fn clean_path_v(self: Dep) ![]const u8 {
39 if (self.type == .http and self.version.len > 0) {39 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]});
41 }41 }
42 return std.mem.join(gpa, "/", &.{"v", try self.clean_path(), self.version});42 return std.mem.join(gpa, "/", &.{"v", try self.clean_path(), self.version});
43 }43 }