From 544f983bad1208b09c99fd2982d4287f5381a89a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Draszik?= Date: Tue, 12 Aug 2025 07:51:34 +0100 Subject: [PATCH] csvImport: fix modified and creation time import MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Creation and last modification time stamps are imported incorrectly during CSV import: * the imported created time is set to the CSV's last modified time * the imported last modified time is set to the CSV's icon index (which isn't a valid time usually and gets set to the current date & time instead). The reason is commit 33a379607466 ("Add ability to parse tags from CSV files") which shifted indices but missed to update all relevant time related code locations. Update the missing indices for those two to fix the import. * Closes #12378 Fixes: 33a379607466 ("Add ability to parse tags from CSV files") Signed-off-by: André Draszik --- src/gui/csvImport/CsvImportWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/csvImport/CsvImportWidget.cpp b/src/gui/csvImport/CsvImportWidget.cpp index cbabd3138..681bbac2f 100644 --- a/src/gui/csvImport/CsvImportWidget.cpp +++ b/src/gui/csvImport/CsvImportWidget.cpp @@ -279,7 +279,7 @@ QSharedPointer CsvImportWidget::buildDatabase() // Modified Time TimeInfo timeInfo; if (m_parserModel->data(m_parserModel->index(r, 9)).isValid()) { - auto datetime = m_parserModel->data(m_parserModel->index(r, 8)).toString(); + auto datetime = m_parserModel->data(m_parserModel->index(r, 9)).toString(); if (datetime.contains(QRegularExpression("^\\d+$"))) { auto t = datetime.toLongLong(); if (t <= INT32_MAX) { @@ -298,7 +298,7 @@ QSharedPointer CsvImportWidget::buildDatabase() } // Creation Time if (m_parserModel->data(m_parserModel->index(r, 10)).isValid()) { - auto datetime = m_parserModel->data(m_parserModel->index(r, 9)).toString(); + auto datetime = m_parserModel->data(m_parserModel->index(r, 10)).toString(); if (datetime.contains(QRegularExpression("^\\d+$"))) { auto t = datetime.toLongLong(); if (t <= INT32_MAX) {