[sound-juicer/wip/hadess/update-flatpak: 1/2] main: Don't throw error if there's no window state
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sound-juicer/wip/hadess/update-flatpak: 1/2] main: Don't throw error if there's no window state
- Date: Mon, 7 Sep 2020 11:45:12 +0000 (UTC)
commit 87412f693dba2bb33971c9fa5ae92e4c14b67ec3
Author: Bastien Nocera <hadess hadess net>
Date: Mon Sep 7 12:55:55 2020 +0200
main: Don't throw error if there's no window state
Such as on the first run.
** (sound-juicer:2): WARNING **: 12:21:01.074: Unable to open
'/home/hadess/.var/app/org.gnome.SoundJuicer/config/sound-juicer/saved-state' - No such file or directory
src/sj-window-state.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
---
diff --git a/src/sj-window-state.c b/src/sj-window-state.c
index c7c5c45e..4ccfbc3e 100644
--- a/src/sj-window-state.c
+++ b/src/sj-window-state.c
@@ -60,7 +60,8 @@ open_state_file (void)
filename,
G_KEY_FILE_KEEP_COMMENTS,
&err)) {
- g_warning ("Unable to open '%s' - %s", filename, err->message);
+ if (!g_error_matches (err, G_FILE_ERROR, G_FILE_ERROR_NOENT))
+ g_warning ("Unable to open '%s' - %s", filename, err->message);
g_error_free (err);
}
g_free (filename);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]