-
Notifications
You must be signed in to change notification settings - Fork 17.8k
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
os: Rename cannot move the file to a different disk drive #13766
Comments
Rename now uses MoveFileEx which was previously not available to use because it is not supported on Windows 2000. Change-Id: I583d029c4467c9be6d1574a790c423559b441e87 Reviewed-on: https://go-review.googlesource.com/6140 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org>
os.Rename doesn't move a file to a different drive on Unix either. I don't see a good reason to use MOVEFILE_COPY_ALLOWED; this is rename, not copy. According to the docs MOVEFILE_COPY_ALLOWED can leave you with two copies of the file, which is not desirable. |
В связи с тем, что в 1.5.2 os.Rename перестал переносить файлы на другой диск (golang/go#13766), используем копирование/удаление
what's the status of this issue? I met the same error: using go1.6 windows/amd64 |
@edisonrf, the status is "closed". See previous comments before it was closed. |
go version go1.5.2 windows/386
After 92c5736 with MoveFileEx os.Rename("r:\1.txt", "z:\1.txt") on windows generate error:
https://msdn.microsoft.com/ru-ru/library/windows/desktop/aa365240(v=vs.85).aspx
So, syscall_windows.go Rename must be
The text was updated successfully, but these errors were encountered: