From 2bb751d9fac54c2b94499d476735730e416a8f4f Mon Sep 17 00:00:00 2001 From: Denis Krjuchkov Date: Sat, 2 Feb 2013 20:42:24 +0600 Subject: StateFile: use file system API, log in UTF-8 --- src/Main.cxx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/Main.cxx') diff --git a/src/Main.cxx b/src/Main.cxx index 7c98c956b..9b6630d60 100644 --- a/src/Main.cxx +++ b/src/Main.cxx @@ -243,16 +243,17 @@ glue_state_file_init(GError **error_r) Path path_fs = Path::FromUTF8(path); - g_free(path); - if (path_fs.IsNull()) { + g_free(path); g_set_error(error_r, main_quark(), 0, "Failed to convert state file path to FS encoding"); return false; } - state_file = new StateFile(std::move(path_fs), + state_file = new StateFile(std::move(path_fs), path, *global_partition, *main_loop); + g_free(path); + state_file->Read(); return true; } -- cgit v1.2.3