| ... | @@ -810,7 +810,7 @@ pub const Dir = struct { | ... | @@ -810,7 +810,7 @@ pub const Dir = struct { |
| 810 | }; | 810 | }; |
| 811 | var attr = w.OBJECT_ATTRIBUTES{ | 811 | var attr = w.OBJECT_ATTRIBUTES{ |
| 812 | .Length = @sizeOf(w.OBJECT_ATTRIBUTES), | 812 | .Length = @sizeOf(w.OBJECT_ATTRIBUTES), |
| 813 | .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd, | 813 | .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd, |
| 814 | .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. | 814 | .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. |
| 815 | .ObjectName = &nt_name, | 815 | .ObjectName = &nt_name, |
| 816 | .SecurityDescriptor = null, | 816 | .SecurityDescriptor = null, |
| ... | @@ -960,7 +960,7 @@ pub const Dir = struct { | ... | @@ -960,7 +960,7 @@ pub const Dir = struct { |
| 960 | }; | 960 | }; |
| 961 | var attr = w.OBJECT_ATTRIBUTES{ | 961 | var attr = w.OBJECT_ATTRIBUTES{ |
| 962 | .Length = @sizeOf(w.OBJECT_ATTRIBUTES), | 962 | .Length = @sizeOf(w.OBJECT_ATTRIBUTES), |
| 963 | .RootDirectory = if (path.isAbsoluteW(sub_path_w)) null else self.fd, | 963 | .RootDirectory = if (path.isAbsoluteWindowsW(sub_path_w)) null else self.fd, |
| 964 | .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. | 964 | .Attributes = 0, // Note we do not use OBJ_CASE_INSENSITIVE here. |
| 965 | .ObjectName = &nt_name, | 965 | .ObjectName = &nt_name, |
| 966 | .SecurityDescriptor = null, | 966 | .SecurityDescriptor = null, |
| ... | @@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags) | ... | @@ -1327,7 +1327,7 @@ pub fn openFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.OpenFlags) |
| 1327 | | 1327 | |
| 1328 | /// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded. | 1328 | /// Same as `openFileAbsolute` but the path parameter is WTF-16 encoded. |
| 1329 | pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File { | 1329 | pub fn openFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.OpenFlags) File.OpenError!File { |
| 1330 | assert(path.isAbsoluteW(absolute_path_w)); | 1330 | assert(path.isAbsoluteWindowsW(absolute_path_w)); |
| 1331 | return cwd().openFileW(absolute_path_w, flags); | 1331 | return cwd().openFileW(absolute_path_w, flags); |
| 1332 | } | 1332 | } |
| 1333 | | 1333 | |
| ... | @@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla | ... | @@ -1350,7 +1350,7 @@ pub fn createFileAbsoluteC(absolute_path_c: [*:0]const u8, flags: File.CreateFla |
| 1350 | | 1350 | |
| 1351 | /// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded. | 1351 | /// Same as `createFileAbsolute` but the path parameter is WTF-16 encoded. |
| 1352 | pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File { | 1352 | pub fn createFileAbsoluteW(absolute_path_w: [*:0]const u16, flags: File.CreateFlags) File.OpenError!File { |
| 1353 | assert(path.isAbsoluteW(absolute_path_w)); | 1353 | assert(path.isAbsoluteWindowsW(absolute_path_w)); |
| 1354 | return cwd().createFileW(absolute_path_w, flags); | 1354 | return cwd().createFileW(absolute_path_w, flags); |
| 1355 | } | 1355 | } |
| 1356 | | 1356 | |
| ... | @@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void | ... | @@ -1371,7 +1371,7 @@ pub fn deleteFileAbsoluteC(absolute_path_c: [*:0]const u8) DeleteFileError!void |
| 1371 | | 1371 | |
| 1372 | /// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded. | 1372 | /// Same as `deleteFileAbsolute` except the parameter is WTF-16 encoded. |
| 1373 | pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void { | 1373 | pub fn deleteFileAbsoluteW(absolute_path_w: [*:0]const u16) DeleteFileError!void { |
| 1374 | assert(path.isAbsoluteW(absolute_path_w)); | 1374 | assert(path.isAbsoluteWindowsW(absolute_path_w)); |
| 1375 | return cwd().deleteFileW(absolute_path_w); | 1375 | return cwd().deleteFileW(absolute_path_w); |
| 1376 | } | 1376 | } |
| 1377 | | 1377 | |