[rygel] core: Populate primary key file if its empty
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [rygel] core: Populate primary key file if its empty
- Date: Fri, 11 Feb 2011 00:27:09 +0000 (UTC)
commit fc915de0404b7a0d19725fb9f39a48c6063a6c6a
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Fri Feb 11 01:40:47 2011 +0200
core: Populate primary key file if its empty
Copy all configuration from secondary key file to primary key file if
primary key file is empty.
src/rygel/rygel-user-config.vala | 7 +++++++
1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/rygel/rygel-user-config.vala b/src/rygel/rygel-user-config.vala
index 4a12747..e004aa5 100644
--- a/src/rygel/rygel-user-config.vala
+++ b/src/rygel/rygel-user-config.vala
@@ -130,6 +130,13 @@ public class Rygel.UserConfig : GLib.Object, Configuration {
debug ("Failed to load user configuration from file '%s': %s",
path,
error.message);
+ size_t size;
+
+ var data = this.sys_key_file.to_data (out size);
+ this.key_file.load_from_data (data,
+ size,
+ KeyFileFlags.KEEP_COMMENTS |
+ KeyFileFlags.KEEP_TRANSLATIONS);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]