mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
fix(PinState): don't trigger sync when file's PinState changed to Unspecified.
LibreOffice/Microsoft office might touch the files for unknown reasons, creating a constant sync state (icon) visible in the parent folder. This fix excludes PinState changes from a new sync if the trigger might have been an external application. Signed-off-by: Camila Ayres <hello@camilasan.com>
This commit is contained in:
parent
5fbafd458a
commit
38b71912fb
@ -652,8 +652,11 @@ void Folder::slotWatchedPathChanged(const QStringView &path, const ChangeReason
|
||||
if (record.isValid()
|
||||
&& !FileSystem::fileChanged(path.toString(), record._fileSize, record._modtime) && _vfs) {
|
||||
spurious = true;
|
||||
|
||||
if (auto pinState = _vfs->pinState(relativePath.toString())) {
|
||||
qCDebug(lcFolder) << "PinState for" << relativePath << "is" << *pinState;
|
||||
if (*pinState == PinState::Unspecified) {
|
||||
spurious = false;
|
||||
}
|
||||
if (*pinState == PinState::AlwaysLocal && record.isVirtualFile()) {
|
||||
spurious = false;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user