Make the first filename on the command line the default filename

From a usecase point of view - if we call with multiple file names then
most likely it's

subsurface MyDives.xml new_dive1.xml new_dive2.xml

and therefore the existing "database" is the first filename, not the last
one (as the current implementation assumes).

Frankly, this is a bit arbitrary - but this one seems to make more sense.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
This commit is contained in:
Dirk Hohndel 2011-10-21 06:12:04 -07:00
parent 41084817ea
commit e55b95b415

View file

@ -989,7 +989,7 @@ void update_progressbar(progressbar_t *progress, double value)
void set_filename(const char *filename)
{
if (filename)
if (!existing_filename && filename)
existing_filename = strdup(filename);
return;
}