summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
authorGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-07 09:08:49 -0700
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-04-07 09:08:49 -0700
commit387dbe510f14ac5590075544431bbedf1e44fb2f (patch)
treea20b4b7fd4686e5bdb060d015580ea70fa31478c /main.c
parenteba62d3cf138854625ec95b75bdd55a35e5217a0 (diff)
parent07c08eafac3eccc9b7360011fd9a19904160351c (diff)
downloadsubsurface-387dbe510f14ac5590075544431bbedf1e44fb2f.tar.gz
Merge branch 'cleanup-from-Qt-branch' of github.com:henrik242/subsurface
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index 3b6e00449..3c0ea7381 100644
--- a/main.c
+++ b/main.c
@@ -348,8 +348,12 @@ int main(int argc, char **argv)
/* if we have exactly one filename, parse_file will set
* that to be the default. Otherwise there will be no default filename */
set_filename(NULL, TRUE);
- parse_file(a, &error, no_filenames);
- no_filenames = FALSE;
+ parse_file(a, &error);
+ if (no_filenames)
+ {
+ set_filename(a, TRUE);
+ no_filenames = FALSE;
+ }
if (error != NULL)
{
report_error(error);
@@ -360,7 +364,7 @@ int main(int argc, char **argv)
if (no_filenames) {
GError *error = NULL;
const char *filename = prefs.default_filename;
- parse_file(filename, &error, TRUE);
+ parse_file(filename, &error);
/* don't report errors - this file may not exist, but make
sure we remember this as the filename in use */
set_filename(filename, FALSE);