summaryrefslogtreecommitdiffhomepage
path: root/control/controlhttp/controlhttpserver
diff options
context:
space:
mode:
authorAaron Klotz <aaron@tailscale.com>2025-01-13 13:02:47 -0700
committerAaron Klotz <aaron@tailscale.com>2025-01-15 13:57:37 -0500
commitfcf90260cef795fc4f4ce98d425da6c69070eecb (patch)
tree9da4767012ba9255d26d88326eabe5c3fce9dace /control/controlhttp/controlhttpserver
parent3431ab17202ed84ba5f9048c9f5afb9b7dfc63d6 (diff)
downloadtailscale-fcf90260cef795fc4f4ce98d425da6c69070eecb.tar.xz
tailscale-fcf90260cef795fc4f4ce98d425da6c69070eecb.zip
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>
Diffstat (limited to 'control/controlhttp/controlhttpserver')
0 files changed, 0 insertions, 0 deletions