mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-28 05:00:20 +00:00
downloader: use global divelog object
The save_dives() function saves dives from the global divelog object. Use the same object when calling parse_file() so that we don't end up with an empty output log file. Signed-off-by: Richard Fuchs <dfx@dfx.at>
This commit is contained in:
parent
caf2f8c102
commit
0ee5c8f03a
1 changed files with 1 additions and 2 deletions
|
@ -41,7 +41,6 @@ int main(int argc, char **argv)
|
|||
QStringList files;
|
||||
QStringList importedFiles;
|
||||
QStringList arguments = QCoreApplication::arguments();
|
||||
struct divelog log;
|
||||
|
||||
// set a default logfile name for libdivecomputer so we always get a logfile
|
||||
logfile_name = strdup("subsurface-downloader.log");
|
||||
|
@ -92,7 +91,7 @@ int main(int argc, char **argv)
|
|||
filesOnCommandLine = !files.isEmpty() || !importedFiles.isEmpty();
|
||||
if (!files.isEmpty()) {
|
||||
qDebug() << "loading dive data from" << files;
|
||||
parse_file(qPrintable(files.first()), &log);
|
||||
parse_file(qPrintable(files.first()), &divelog);
|
||||
}
|
||||
print_files();
|
||||
if (!quit) {
|
||||
|
|
Loading…
Reference in a new issue