mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-01 00:03:24 +00:00
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>
This commit is contained in:
parent
9f5d9bd94f
commit
1771500078
1 changed files with 4 additions and 0 deletions
4
file.c
4
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"),
|
||||
|
|
Loading…
Add table
Reference in a new issue