You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tailscale/atomicfile
Aaron Klotz fcf90260ce atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved
I moved the actual rename into separate, GOOS-specific files. On
non-Windows, we do a simple os.Rename. On Windows, we first try
ReplaceFile with a fallback to os.Rename if the target file does
not exist.

ReplaceFile is the recommended way to rename the file in this use case,
as it preserves attributes and ACLs set on the target file.

Updates #14428

Signed-off-by: Aaron Klotz <aaron@tailscale.com>
11 months ago
..
atomicfile.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago
atomicfile_notwindows.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago
atomicfile_test.go various: add golangci-lint, fix issues (#7905) 3 years ago
atomicfile_windows.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago
atomicfile_windows_test.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago
mksyscall.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago
zsyscall_windows.go atomicfile: use ReplaceFile on Windows so that attributes and ACLs are preserved 11 months ago