Commit bbd5249
committed
contenthash: unconditionally clear ModeIrregular during content hash
Go 1.23 changed the behavior of `os.Stat` to set `ModeIrregular` when it
encountered a mount point reparse point on Windows. These were
previously labeled as symlinks.
We attempted to fix this by clearing `ModeIrregular` during checksum
generation, but we only cleared it in the case where `ModeIrregular` and
at least one other mode type was set.
After reviewing the original solution and issue, I believe that this was
too conservative. The original issue seems to indicate that only the
`ModeIrregular` bit was set so the condition would not have triggered
and cleared it properly. I thought mount points would have both
`ModeDir` and `ModeIrregular` set, but they only seem to have
`ModeIrregular` set.
This unconditionally clears the bit similar to socket files which should
properly fix the issue on Windows.1 parent 25c7c80 commit bbd5249
1 file changed
+2
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
| 44 | + | |
54 | 45 | | |
| 46 | + | |
55 | 47 | | |
56 | 48 | | |
57 | 49 | | |
| |||
0 commit comments