[Bug 1240927] Re: os.rename does not work with windows
James Page
james.page at ubuntu.com
Thu Nov 21 10:01:55 UTC 2013
** Description changed:
- Turns out that os.rename works as atomic file replacement on linux, but
- not on Windows. There's actually no way (as far as I can tell) to
- atomically replace a file with another one on windows using the go code
- as written. Luckily, it's not hard to wrap the Windows API in go code
- and use that.... so that's what this code code.
+ [Impact]
+ juju is broken as a client on Windows
+
+ [Test Case]
+ Use juju on windows; renaming of files breaks and client exits
+
+ [Regression Potential]
+ Although this is a bug that only impacts Windows client users, the fix potentially impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do).
+
+ [Original Bug Report]
+ Turns out that os.rename works as atomic file replacement on linux, but not on Windows. There's actually no way (as far as I can tell) to atomically replace a file with another one on windows using the go code as written. Luckily, it's not hard to wrap the Windows API in go code and use that.... so that's what this code code.
** Description changed:
[Impact]
juju is broken as a client on Windows
[Test Case]
Use juju on windows; renaming of files breaks and client exits
[Regression Potential]
- Although this is a bug that only impacts Windows client users, the fix potentially impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do).
+ Although this is a bug that only impacts Windows client users, the fix impacts the way all renames are done in the client and server, so care should be taking to ensure that non-Windows environments still function (they do).
[Original Bug Report]
Turns out that os.rename works as atomic file replacement on linux, but not on Windows. There's actually no way (as far as I can tell) to atomically replace a file with another one on windows using the go code as written. Luckily, it's not hard to wrap the Windows API in go code and use that.... so that's what this code code.
--
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to juju-core in Ubuntu.
https://bugs.launchpad.net/bugs/1240927
Title:
os.rename does not work with windows
To manage notifications about this bug go to:
https://bugs.launchpad.net/juju-core/+bug/1240927/+subscriptions
More information about the Ubuntu-server-bugs
mailing list