authorgravatar for gereeter+code@gmail.comJonathan S <gereeter+code@gmail.com> 2019-11-22 16:40:23-06:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2019-11-25 23:46:48-05:00
log8baf226d693a8c522be8d66ecd4edb11fa99a749
tree7ef03055ff0bdcffb6cc9106d29c497e86698d8d
parent4014a8e4b44bad5aca896ce0fdf120ef4212fc8d

Add missing shortening of os.windows.


1 files changed, 4 insertions(+), 0 deletions(-)

lib/std/fs.zig+4
......@@ -850,12 +850,16 @@ pub const Dir = struct {
850850 /// Same as `openDirTraverse` except the path parameter is UTF16LE, NT-prefixed.
851851 /// This function is Windows-only.
852852 pub fn openDirTraverseW(self: Dir, sub_path_w: [*:0]const u16) OpenError!Dir {
853 const w = os.windows;
854
853855 return self.openDirAccessMaskW(sub_path_w, w.STANDARD_RIGHTS_READ | w.FILE_READ_ATTRIBUTES | w.FILE_READ_EA | w.SYNCHRONIZE | w.FILE_TRAVERSE);
854856 }
855857
856858 /// Same as `openDirList` except the path parameter is UTF16LE, NT-prefixed.
857859 /// This function is Windows-only.
858860 pub fn openDirListW(self: Dir, sub_path_w: [*:0]const u16) OpenError!Dir {
861 const w = os.windows;
862
859863 return self.openDirAccessMaskW(sub_path_w, w.STANDARD_RIGHTS_READ | w.FILE_READ_ATTRIBUTES | w.FILE_READ_EA | w.SYNCHRONIZE | w.FILE_TRAVERSE | w.FILE_LIST_DIRECTORY);
860864 }
861865