authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-07 15:14:47-05:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2020-03-07 15:14:47-05:00
logc25d9417d34fc7745ed50fdfe2984895657254d5
tree9bed61822bdb568e9ba2a18b060c9f57898205b2
parentabe7305e169be2047d65f96e6525d3828684f058
signaturelock-open Commit is signed but in an unrecognized format.

fix std.fs.makeDirAbsolute

closes #4671

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

lib/std/fs.zig+3-1
...@@ -266,7 +266,7 @@ const default_new_dir_mode = 0o755;...@@ -266,7 +266,7 @@ const default_new_dir_mode = 0o755;
266/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates266/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates
267/// on both absolute and relative paths.267/// on both absolute and relative paths.
268pub fn makeDirAbsolute(absolute_path: []const u8) !void {268pub fn makeDirAbsolute(absolute_path: []const u8) !void {
269 assert(path.isAbsoluteC(absolute_path));269 assert(path.isAbsolute(absolute_path));
270 return os.mkdir(absolute_path, default_new_dir_mode);270 return os.mkdir(absolute_path, default_new_dir_mode);
271}271}
272272
...@@ -1669,6 +1669,8 @@ pub fn realpathAlloc(allocator: *Allocator, pathname: []const u8) ![]u8 {...@@ -1669,6 +1669,8 @@ pub fn realpathAlloc(allocator: *Allocator, pathname: []const u8) ![]u8 {
1669}1669}
16701670
1671test "" {1671test "" {
1672 _ = makeDirAbsolute;
1673 _ = makeDirAbsoluteZ;
1672 _ = @import("fs/path.zig");1674 _ = @import("fs/path.zig");
1673 _ = @import("fs/file.zig");1675 _ = @import("fs/file.zig");
1674 _ = @import("fs/get_app_data_dir.zig");1676 _ = @import("fs/get_app_data_dir.zig");