StateFile: use file system API, log in UTF-8

This commit is contained in:
Denis Krjuchkov
2013-02-02 20:42:24 +06:00
parent 3b620112ca
commit 2bb751d9fa
3 changed files with 16 additions and 11 deletions

View File

@@ -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;
}