fix std.fs.makeDirAbsolute

closes #4671
master
Andrew Kelley 2020-03-07 15:14:47 -05:00
parent abe7305e16
commit c25d9417d3
No known key found for this signature in database
GPG Key ID: 7C5F548F728501A9
1 changed files with 3 additions and 1 deletions

View File

@ -266,7 +266,7 @@ const default_new_dir_mode = 0o755;
/// Asserts that the path is absolute. See `Dir.makeDir` for a function that operates
/// on both absolute and relative paths.
pub fn makeDirAbsolute(absolute_path: []const u8) !void {
assert(path.isAbsoluteC(absolute_path));
assert(path.isAbsolute(absolute_path));
return os.mkdir(absolute_path, default_new_dir_mode);
}
@ -1669,6 +1669,8 @@ pub fn realpathAlloc(allocator: *Allocator, pathname: []const u8) ![]u8 {
}
test "" {
_ = makeDirAbsolute;
_ = makeDirAbsoluteZ;
_ = @import("fs/path.zig");
_ = @import("fs/file.zig");
_ = @import("fs/get_app_data_dir.zig");