Commit 4cd733b
committed
fix(windows): use 0 for file mode on Windows (zig 0.16.0 compat)
zig 0.16.0 changed std.fs.File.Permissions on Windows from an
options struct (with .toMode() returning a POSIX mode integer)
to an enum (Windows-specific DWORD). Calling .toMode() on
Windows now fails to compile with:
src\archiver.zig:97:65: error: no field or member function
named 'toMode' in 'Io.File.Permissions__enum_2757'
Fix: write 0 for the file mode on Windows. POSIX mode bits
don't apply there, and the archive is read on the same machine
that wrote it, so the receiver can derive permissions from its
own filesystem.
On non-Windows platforms, keep the existing behavior of
writing @intcast(stat.permissions.toMode()).1 parent 5150c83 commit 4cd733b
1 file changed
Lines changed: 10 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
98 | 107 | | |
99 | 108 | | |
100 | 109 | | |
| |||
0 commit comments