summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-15 04:44:00 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2012-09-15 04:44:00 -0700
commit1771500078312047d4c9ca1800af17029983e69f (patch)
tree42b6a12c0191e98e404d77d7c2117df75b985f45 /file.c
parent9f5d9bd94f092739f0f8e846f8e19ec30a8c0c52 (diff)
downloadsubsurface-1771500078312047d4c9ca1800af17029983e69f.tar.gz
Don't show an error if we can't load the default file
The user may not have created it, yet. Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/file.c b/file.c
index b9a598e2a..ca39c8dd6 100644
--- a/file.c
+++ b/file.c
@@ -253,6 +253,10 @@ void parse_file(const char *filename, GError **error)
struct memblock mem;
if (readfile(filename, &mem) < 0) {
+ /* we don't want to display an error if this was the default file */
+ if (default_filename && ! strcmp(filename, default_filename))
+ return;
+
fprintf(stderr, "Failed to read '%s'.\n", filename);
if (error) {
*error = g_error_new(g_quark_from_string("subsurface"),