diff options
-rw-r--r-- | changelog/unreleased/9236 | 5 | ||||
-rw-r--r-- | src/libsync/discovery.cpp | 14 |
2 files changed, 16 insertions, 3 deletions
diff --git a/changelog/unreleased/9236 b/changelog/unreleased/9236 new file mode 100644 index 000000000..68f7e7af0 --- /dev/null +++ b/changelog/unreleased/9236 @@ -0,0 +1,5 @@ +Bugfix: Client warns about non exisitng files + +We fixed a bug where the client warns about ignored files that where added to the DB in previous versions of the client and do no longer exist. + +https://github.com/owncloud/client/issues/9236 diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp index 4dd5bc695..8a943e695 100644 --- a/src/libsync/discovery.cpp +++ b/src/libsync/discovery.cpp @@ -167,10 +167,18 @@ void ProcessDirectoryJob::process() // local stat function. // Recall file shall not be ignored (#4420) bool isHidden = e.localEntry.isHidden || (f.first[0] == QLatin1Char('.') && f.first != QLatin1String(".sys.admin#recall#")); - if (handleExcluded(path._target, e.localEntry.name, - e.localEntry.isDirectory || e.serverEntry.isDirectory, isHidden, - e.localEntry.isSymLink)) + if (handleExcluded(path._target, + e.localEntry.name, + e.localEntry.isDirectory || e.serverEntry.isDirectory, + isHidden, + e.localEntry.isSymLink)) { + // the file only exists in the db + if (!e.localEntry.isValid() && e.dbEntry.isValid()) { + qCWarning(lcDisco) << "Removing db entry for non exisitng ignored file:" << path._original; + _discoveryData->_statedb->deleteFileRecord(path._original, true); + } continue; + } if (_queryServer == InBlackList || _discoveryData->isInSelectiveSyncBlackList(path._original)) { processBlacklisted(path, e.localEntry, e.dbEntry); |