mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2025-09-22 22:04:48 -04: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 commit33a3796074
("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
8d59090243
commit
544f983bad
1 changed files with 2 additions and 2 deletions
|
@ -279,7 +279,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) {
|
||||
|
@ -298,7 +298,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…
Add table
Add a link
Reference in a new issue