From 8baf226d693a8c522be8d66ecd4edb11fa99a749 Mon Sep 17 00:00:00 2001 From: Jonathan S Date: Fri, 22 Nov 2019 16:40:23 -0600 Subject: [PATCH] Add missing shortening of os.windows. --- lib/std/fs.zig | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/std/fs.zig b/lib/std/fs.zig index e2ac561c7e..0a08126c00 100644 --- a/lib/std/fs.zig +++ b/lib/std/fs.zig @@ -850,12 +850,16 @@ pub const Dir = struct { /// Same as `openDirTraverse` except the path parameter is UTF16LE, NT-prefixed. /// This function is Windows-only. pub fn openDirTraverseW(self: Dir, sub_path_w: [*:0]const u16) OpenError!Dir { + const w = os.windows; + return self.openDirAccessMaskW(sub_path_w, w.STANDARD_RIGHTS_READ | w.FILE_READ_ATTRIBUTES | w.FILE_READ_EA | w.SYNCHRONIZE | w.FILE_TRAVERSE); } /// Same as `openDirList` except the path parameter is UTF16LE, NT-prefixed. /// This function is Windows-only. pub fn openDirListW(self: Dir, sub_path_w: [*:0]const u16) OpenError!Dir { + const w = os.windows; + 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); }