authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 11:32:04 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 11:32:04 -08:00
logfc45e9b7d91e3d0e010650fd12ac4ced2234d5de
treecb51b972e1c16fb198c9610060542e4a7ee8952f
parent36cbab3db222c092a51084b1532e5b199de23199

use path.join instead of string concat


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

src/cmd_fetch.zig+1-1
...@@ -10,7 +10,7 @@ const u = @import("./util/index.zig");...@@ -10,7 +10,7 @@ const u = @import("./util/index.zig");
10pub fn execute(args: [][]u8) !void {10pub fn execute(args: [][]u8) !void {
11 //11 //
12 const home = try known_folders.getPath(gpa, .home);12 const home = try known_folders.getPath(gpa, .home);
13 const dir = try std.fmt.allocPrint(gpa, "{}{}", .{home, "/.cache/zigmod"});13 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
1414
15 const top_module = try fetch_deps(dir, "./zig.mod");15 const top_module = try fetch_deps(dir, "./zig.mod");
1616
src/cmd_sum.zig+1-1
...@@ -11,7 +11,7 @@ const common = @import("./common.zig");...@@ -11,7 +11,7 @@ const common = @import("./common.zig");
11pub fn execute(args: [][]u8) !void {11pub fn execute(args: [][]u8) !void {
12 //12 //
13 const home = try known_folders.getPath(gpa, .home);13 const home = try known_folders.getPath(gpa, .home);
14 const dir = try std.fmt.allocPrint(gpa, "{}{}", .{home, "/.cache/zigmod"});14 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
15 const top_module = try common.collect_deps(dir, "./zig.mod");15 const top_module = try common.collect_deps(dir, "./zig.mod");
16 16
17 //17 //