mirror of
https://github.com/weechat/weechat.git
synced 2026-07-10 03:33:12 +02:00
core: fix truncated config files (zero-length) after system crash (bug #36383)
The function config_file_write_internal now performs an overwrite-by-rename (call to "rename" only) instead of calls to "unlink" then "rename".
This commit is contained in:
committed by
Sebastien Helleu
parent
dfbe7845ae
commit
59234aef2d
@@ -7,6 +7,7 @@ v0.3.8-dev, 2012-05-03
|
||||
Version 0.3.8 (under dev!)
|
||||
--------------------------
|
||||
|
||||
* core: fix truncated config files (zero-length) after system crash (bug #36383)
|
||||
* core: fix display bugs and crashs with small windows (bug #36107)
|
||||
* core: convert options weechat.look.prefix_align_more and
|
||||
weechat.look.prefix_buffer_align_more from boolean to string (task #11197)
|
||||
|
||||
@@ -2022,9 +2022,6 @@ config_file_write_internal (struct t_config_file *config_file,
|
||||
/* update file mode */
|
||||
chmod (filename2, 0600);
|
||||
|
||||
/* remove target file */
|
||||
unlink (filename);
|
||||
|
||||
/* rename temp file to target file */
|
||||
rc = rename (filename2, filename);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user