diff options
author | Denis Krjuchkov <denis@crazydev.net> | 2013-02-02 20:42:24 +0600 |
---|---|---|
committer | Denis Krjuchkov <denis@crazydev.net> | 2013-02-02 20:52:04 +0600 |
commit | 2bb751d9fac54c2b94499d476735730e416a8f4f (patch) | |
tree | dfccd7aa38b400051556caf38de161e815880588 /src/Main.cxx | |
parent | 3b620112ca8f4bb3fa5ae01c8ee44ee850ff0818 (diff) |
StateFile: use file system API, log in UTF-8
Diffstat (limited to 'src/Main.cxx')
-rw-r--r-- | src/Main.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/Main.cxx b/src/Main.cxx index 7c98c956..9b6630d6 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; } |