check if config file exists
This commit is contained in:
parent
d950f0a7a2
commit
9c43963dce
@ -33,6 +33,13 @@ namespace Sernatur {
|
||||
GLib.Object (application: application);
|
||||
Database conn;
|
||||
|
||||
var file = File.new_for_path ("/etc/sernatur/sernatur.conf");
|
||||
if (!file.query_exists ()) {
|
||||
stderr.printf (dgettext (null, "File '%s' doesn't exist.\n"), file.get_path ());
|
||||
application.quit ();
|
||||
return;
|
||||
}
|
||||
|
||||
Config config = Config();
|
||||
if (!config.read_file ("/etc/sernatur/sernatur.conf")) {
|
||||
stderr.printf ("%s\n", config.error_message ());
|
||||
|
Loading…
Reference in New Issue
Block a user