Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
syscall: windows doesn't allow renames for read-only files #35043
On Windows, right now we map the lack of the writable bit in Unix file permissions to FILE_ATTRIBUTES_READONLY. This sort of works fine, but this actually prohibits rename-in-place, whereas it's allowed on Unix.
I'm not suggesting that we change this mapping to something else right now, but in case things pop up down the line related to this, here's a bug to track it.
The file system behaviour itself is already documented as part of the OS. As long as Go doesn't do anything special to prevent the rename, that's exactly where that documentation should live.
It might make sense to document the mapping of Unix permission bits to Windows file attributes though.