[PATCH] AtomicFile: set mode of a new file to the mode returned by os.stat()

Bartosz Oler liar at bzimage.us
Fri Nov 18 20:38:13 GMT 2005


Hi!

On Linux, symlinks always have mode 0777, thus if using os.lstat() and 
realfile is a symlink, then the permissions of a tmpfile (new file) will be 
0777. That's unexpected behaviour.

Frankly, I have no idea how this works on Windows and the test case probably 
will fail there. :|

Btw, this patch also fixes #4559.


take care,
Bartosz
-------------- next part --------------
A non-text attachment was scrubbed...
Name: chmod_from_stat_and_ignore.diff
Type: text/x-diff
Size: 3266 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20051118/cb16216a/attachment.bin 


More information about the bazaar mailing list