Skip to content

Commit

Permalink
Merge pull request #7572 from nextcloud/bugfix/doNotChangeModificatio…
Browse files Browse the repository at this point in the history
…nTimeWhenLockingOrUnlockingFiles

when updating a virtual file after lock/unlock: avoid setting modtime
  • Loading branch information
mgallien authored Nov 29, 2024
2 parents 7a41a56 + 42cae2c commit 907b07c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/gui/folder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -666,7 +666,7 @@ void Folder::slotFilesLockReleased(const QSet<QString> &files)
SyncJournalFileRecord rec;
const auto isFileRecordValid = journalDb()->getFileRecord(fileRecordPath, &rec) && rec.isValid();
if (isFileRecordValid) {
[[maybe_unused]] const auto result = _vfs->updateMetadata(path() + rec.path(), rec._modtime, rec._fileSize, rec._fileId);
[[maybe_unused]] const auto result = _vfs->updatePlaceholderMarkInSync(path() + rec.path(), rec._fileId);
}
const auto canUnlockFile = isFileRecordValid
&& rec._lockstate._locked
Expand Down Expand Up @@ -709,7 +709,7 @@ void Folder::slotFilesLockImposed(const QSet<QString> &files)
const auto fileRecordPath = fileFromLocalPath(file);
SyncJournalFileRecord rec;
if (journalDb()->getFileRecord(fileRecordPath, &rec) && rec.isValid()) {
[[maybe_unused]] const auto result = _vfs->updateMetadata(path() + rec.path(), rec._modtime, rec._fileSize, rec._fileId);
[[maybe_unused]] const auto result = _vfs->updatePlaceholderMarkInSync(path() + rec.path(), rec._fileId);
}
}
}
Expand Down

0 comments on commit 907b07c

Please sign in to comment.