-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WriteFile is broken on Windows #17
Comments
It does not seem possible to do atomic file replacement on Windows, see the discussion in #1. If you want a |
I also just noticed that these other referenced issues belong to another project: twpayne/chezmoi While not being atomic, it would still be better than just writing files directly, wouldn't it? I don't care about |
The first link is to hectane/go-acl. This library has a pending pull request (hectane/go-acl#14) that improves Windows support. The second link is to a friendly fork that includes that PR. |
I think I did a poor job communicating what I am trying to achieve here. In my case, I don't care about the Do you want to "fix" Or, do you want to let |
I don’t do Windows development, so I’ll rely on a pull request containing a fix. Thanks in advance :) |
Ok, so apparently f.Chmod(perm) errors out on windows as the syscall is not available but os.Chmod(filename, perm) does not error! Maybe we can just change the code to use the latter (with t.Name() as filename) ... |
I've read a couple issues on Windows support, and I'm not sure what the current support state is.
Anyway, the
WriteFile
function is broken on Windows, as*os.File.Chmod()
used in the function is not supported on Windows:renameio/writefile.go
Line 29 in a368f99
The text was updated successfully, but these errors were encountered: