aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arctica-greeter.vala19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/arctica-greeter.vala b/src/arctica-greeter.vala
index c07665c..684c368 100644
--- a/src/arctica-greeter.vala
+++ b/src/arctica-greeter.vala
@@ -105,14 +105,19 @@ public class ArcticaGreeter : Object
state_file = Path.build_filename (state_dir, state_file_name);
state = new KeyFile ();
- try
- {
- state.load_from_file (state_file, KeyFileFlags.NONE);
+ if (FileUtils.test (state_file, FileTest.EXISTS)) {
+ try
+ {
+ state.load_from_file (state_file, KeyFileFlags.NONE);
+ }
+ catch (Error e)
+ {
+ if (!(e is FileError.NOENT))
+ warning ("Failed to load state from %s: %s\n", state_file, e.message);
+ }
}
- catch (Error e)
- {
- if (!(e is FileError.NOENT))
- warning ("Failed to load state from %s: %s\n", state_file, e.message);
+ else {
+ debug ("State file does not (yet) exist: %s\n", state_file);
}
}