Skip to content

Commit 42cae2c

Browse files
committed
when updating a virtual file after lock/unlock: avoid setting modtime
will prevent truncating the modification time when changing the lock state of a file could be visible when using an office software to open an office file with automated locking happening after the file gets opened Signed-off-by: Matthieu Gallien <[email protected]>
1 parent 7a41a56 commit 42cae2c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/folder.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ void Folder::slotFilesLockReleased(const QSet<QString> &files)
666666
SyncJournalFileRecord rec;
667667
const auto isFileRecordValid = journalDb()->getFileRecord(fileRecordPath, &rec) && rec.isValid();
668668
if (isFileRecordValid) {
669-
[[maybe_unused]] const auto result = _vfs->updateMetadata(path() + rec.path(), rec._modtime, rec._fileSize, rec._fileId);
669+
[[maybe_unused]] const auto result = _vfs->updatePlaceholderMarkInSync(path() + rec.path(), rec._fileId);
670670
}
671671
const auto canUnlockFile = isFileRecordValid
672672
&& rec._lockstate._locked
@@ -709,7 +709,7 @@ void Folder::slotFilesLockImposed(const QSet<QString> &files)
709709
const auto fileRecordPath = fileFromLocalPath(file);
710710
SyncJournalFileRecord rec;
711711
if (journalDb()->getFileRecord(fileRecordPath, &rec) && rec.isValid()) {
712-
[[maybe_unused]] const auto result = _vfs->updateMetadata(path() + rec.path(), rec._modtime, rec._fileSize, rec._fileId);
712+
[[maybe_unused]] const auto result = _vfs->updatePlaceholderMarkInSync(path() + rec.path(), rec._fileId);
713713
}
714714
}
715715
}

0 commit comments

Comments
 (0)