summaryrefslogtreecommitdiffstats
path: root/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/main.c b/main.c
index 2489473b9..a2c24ec99 100644
--- a/main.c
+++ b/main.c
@@ -211,6 +211,7 @@ void renumber_dives(int nr)
int main(int argc, char **argv)
{
int i;
+ gboolean no_filenames = TRUE;
output_units = SI_units;
@@ -225,6 +226,7 @@ int main(int argc, char **argv)
parse_argument(a);
continue;
}
+ no_filenames = FALSE;
GError *error = NULL;
parse_file(a, &error);
@@ -235,7 +237,14 @@ int main(int argc, char **argv)
error = NULL;
}
}
-
+ if (no_filenames) {
+ GError *error = NULL;
+ const char *filename = subsurface_default_filename();
+ 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);
+ }
report_dives(imported);
run_ui();