Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
os: Case-only renames not possible on case insensitive filesystems #35222
What version of Go are you using (
The same check also prevents renaming over an empty directory which the actual system call would allow. Given the wording of the os.Rename docs, this could be intentional. Not sure it's a good thing, as this issue clearly demonstrates. Piling on yet more racy checks to work around the unintended side effects seems contraproductive.
What about removing the newpath existence check in os and just letting the OS handle it?