1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00
irssi/src/lib-config
dequis 8deb6182c6 Make config_write more atomic to prevent truncation when out of space
This is modeled after glib's g_file_set_contents. It doesn't use that
function directly because the writing is done with GIOChannel
streaming-like writes and g_file_set_contents expects the whole thing to
be in-memory.

Main differences with g_file_set_contents:

- complete lack of win32 special casing (cygwin/WSL should work though)
- no fallocate() (linux only, but we don't know the size upfront, anyway)
- always calls fsync (glib skips it on btrfs or when not overwriting)

Other than that, it's the same old mkstemp + fsync + rename.
2018-04-08 15:52:09 -03:00
..
get.c Change g_hash_table_contains() for compatibility with glib < 2.32 2015-04-20 08:01:01 +02:00
iconfig.h add CONFIG_REC to config_node_section* APIs 2015-02-17 09:50:55 +01:00
Makefile.am s/INCLUDES/AM_CPPFLAGS/g 2014-06-27 09:06:21 -04:00
module.h Sorry for a big update - I still don't have internet connection at home 2000-04-14 11:27:14 +00:00
parse.c add CONFIG_REC to config_node_section* APIs 2015-02-17 09:50:55 +01:00
set.c Enforce the is_node_list contract in lib-config setters. 2016-11-29 23:08:45 +01:00
write.c Make config_write more atomic to prevent truncation when out of space 2018-04-08 15:52:09 -03:00