summaryrefslogtreecommitdiffstats
path: root/desktop-widgets/mainwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'desktop-widgets/mainwindow.cpp')
-rw-r--r--desktop-widgets/mainwindow.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/desktop-widgets/mainwindow.cpp b/desktop-widgets/mainwindow.cpp
index efe91bf23..6542a3ead 100644
--- a/desktop-widgets/mainwindow.cpp
+++ b/desktop-widgets/mainwindow.cpp
@@ -1736,11 +1736,12 @@ void MainWindow::importTxtFiles(const QStringList fileNames)
csv.replace(strlen(csv.data()) - 3, 3, "csv");
QFileInfo check_file(csv);
- if (check_file.exists() && check_file.isFile())
+ if (check_file.exists() && check_file.isFile()) {
if (parse_txt_file(fileNamePtr.data(), csv) == 0)
csvFiles += fileNames.at(i);
- else
- csvFiles += fileNames.at(i);
+ } else {
+ csvFiles += fileNamePtr;
+ }
}
if (csvFiles.size()) {
DiveLogImportDialog *diveLogImport = new DiveLogImportDialog(csvFiles, this);