aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2016-05-05 09:26:11 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2016-05-05 07:28:00 -0700
commit98741c864cf995c92fb0550d8b4d9aa1585f2494 (patch)
tree38b78582c9b6928ce8a0901ad06dba58ecd40883
parent74065ad8aabb0b43bb70df9ab3cc319dc21f9430 (diff)
downloadsubsurface-98741c864cf995c92fb0550d8b4d9aa1585f2494.tar.gz
Use encoded file name on import
Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
-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);