Commit Graph

9 Commits

Author SHA1 Message Date
Inaky Perez-Gonzalez ed8ef7a1e8 storage: make write_file transaction-safe
write_file(), as written wasn't transaction-safe; a crash bewtween a
file being open and the buffer being written before a safe close would
leave the file with a set of undetermined contents.

Modified to the file is written to a temporary file name; once
completed, it is renamed to the final name. This way, a crash in the
middle doesn't leave half-baked files.
2010-08-05 11:59:22 -05:00
Denis Kenzior 9b6876ef25 storage: whitespace issue 2010-06-21 15:40:14 -05:00
Denis Kenzior 68b01ce93e Refactor: create_dirs logic
- Remove reference to g_malloc and replace with g_try_malloc
- Be extra pedantic on the inputs
- Refactor the logic to make it slightly easier to follow
2010-03-16 17:19:01 -05:00
Marcel Holtmann 144080e749 Update copyright information 2010-01-01 17:00:10 -08:00
Denis Kenzior cbe52b9a44 Fix: Quiet compiler warnings 2009-10-30 16:09:59 -05:00
Denis Kenzior 6b46d7d363 Add utilities for settings management 2009-10-30 15:22:06 -05:00
Denis Kenzior 6b19de8c07 Fix: Remove unused header include 2009-10-30 13:20:31 -05:00
Denis Kenzior fa33588d40 Fix: style issues 2009-10-30 12:37:23 -05:00
Andrzej Zaborowski 17cb0ce3c4 Move create_dirs to storage.c, add file read/write utilities 2009-09-08 13:34:07 -05:00