mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2026-03-11 08:54:48 +00:00
csvImport: fix modified and creation time import
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 33a3796074 ("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: 33a3796074 ("Add ability to parse tags from CSV files")
Signed-off-by: André Draszik <andre.draszik@linaro.org>
This commit is contained in:
parent
8fd16f7d14
commit
99052b21d4
1 changed files with 2 additions and 2 deletions
|
|
@ -281,7 +281,7 @@ QSharedPointer<Database> 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) {
|
||||
|
|
@ -300,7 +300,7 @@ QSharedPointer<Database> 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) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue