mirror of
https://github.com/ziglang/zig.git
synced 2026-02-17 23:10:09 +00:00
adjust renameatW to always supply dest root dir
this fixes tests for wine
This commit is contained in:
parent
7e45a3ef6a
commit
a27a8561e9
@ -116,7 +116,7 @@ pub const Allocator = struct {
|
||||
pub fn allocSentinel(self: *Allocator, comptime Elem: type, n: usize, comptime sentinel: Elem) Error![:sentinel]Elem {
|
||||
var ptr = try self.alloc(Elem, n + 1);
|
||||
ptr[n] = sentinel;
|
||||
return ptr[0 .. n :sentinel];
|
||||
return ptr[0..n :sentinel];
|
||||
}
|
||||
|
||||
pub fn alignedAlloc(
|
||||
|
||||
@ -1664,7 +1664,7 @@ pub fn renameatW(
|
||||
|
||||
rename_info.* = .{
|
||||
.ReplaceIfExists = ReplaceIfExists,
|
||||
.RootDirectory = if (old_dir_fd == new_dir_fd or std.fs.path.isAbsoluteWindowsW(new_path_w)) null else new_dir_fd,
|
||||
.RootDirectory = if (std.fs.path.isAbsoluteWindowsW(new_path_w)) null else new_dir_fd,
|
||||
.FileNameLength = @intCast(u32, new_path.len * 2), // already checked error.NameTooLong
|
||||
.FileName = undefined,
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user