mirror of
https://github.com/syncthing/syncthing.git
synced 2026-05-11 08:33:04 -04:00
So, in a funny plot twist, it turns out that WriteFile in Go 1.13 doesn't actually set the read only bit on Windows when called with permissions 0444 so my test was broken. With an improved test it turns out that Rename does not, in fact, overwrite a read-only file on Windows. This adds a fix for that. (Rename might get improved in Go 1.15...)