Skip to content

Commit 3796a11

Browse files
committed
fix windows fs watch error on absolute paths
1 parent 52d3903 commit 3796a11

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/core/standard/fs/watch.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ pub const FileSystemWatcher = struct {
586586
};
587587
var attr = std.os.windows.OBJECT_ATTRIBUTES{
588588
.Length = @sizeOf(std.os.windows.OBJECT_ATTRIBUTES),
589-
.RootDirectory = self.dir.fd,
589+
.RootDirectory = if (std.fs.path.isAbsoluteWindowsW(ptr)) null else self.dir.fd,
590590
.Attributes = 0,
591591
.ObjectName = &nt_name,
592592
.SecurityDescriptor = null,

0 commit comments

Comments
 (0)