Check gschemas.compiled existance.
This commit is contained in:
parent
ea12d09600
commit
ae7ea2b64b
|
@ -14,11 +14,14 @@ namespace LAview.Desktop {
|
||||||
}
|
}
|
||||||
|
|
||||||
public AppSettings () throws Error {
|
public AppSettings () throws Error {
|
||||||
|
string schema_file = AppDirs.settings_dir+"/gschemas.compiled";
|
||||||
|
if (!File.new_for_path (schema_file).query_exists ())
|
||||||
|
throw new IOError.NOT_FOUND ("File "+schema_file+" not found");
|
||||||
SettingsSchemaSource sss = new SettingsSchemaSource.from_directory (AppDirs.settings_dir, null, false);
|
SettingsSchemaSource sss = new SettingsSchemaSource.from_directory (AppDirs.settings_dir, null, false);
|
||||||
SettingsSchema schema = sss.lookup ("ws.backbone.laview.desktop-"+Config.VERSION_MAJOR.to_string(), false);
|
string schema_name = "ws.backbone.laview.desktop-"+Config.VERSION_MAJOR.to_string();
|
||||||
|
SettingsSchema schema = sss.lookup (schema_name, false);
|
||||||
if (schema == null) {
|
if (schema == null) {
|
||||||
stderr.printf ("ID not found.\n");
|
throw new IOError.NOT_FOUND ("Schema "+schema_name+" not found in "+schema_file);
|
||||||
throw new IOError.NOT_FOUND (_("File ")+AppDirs.settings_dir+"/gschemas.compiled"+_(" not found"));
|
|
||||||
}
|
}
|
||||||
settings = new Settings.full (schema, null, null);
|
settings = new Settings.full (schema, null, null);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue