Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/desktop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-01-05 17:47:41 +0300
committerMatthieu Gallien (Rebase PR Action) <matthieu_gallien@yahoo.fr>2021-05-06 10:35:59 +0300
commite04c6abcd5e87bf2e7733232cb760d4e2707ca8d (patch)
tree836115c68015ca38d9f6d14d8a0abb8f727d216f /src/libsync/discovery.cpp
parentadb56178b9934a8f2760fe1176c576b0420d489e (diff)
Fix placeholder detection for cfapi
Fixes: #8326 Signed-off-by: Matthieu Gallien <matthieu_gallien@yahoo.fr>
Diffstat (limited to 'src/libsync/discovery.cpp')
-rw-r--r--src/libsync/discovery.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/src/libsync/discovery.cpp b/src/libsync/discovery.cpp
index ce58549fe..711e9921e 100644
--- a/src/libsync/discovery.cpp
+++ b/src/libsync/discovery.cpp
@@ -885,16 +885,15 @@ void ProcessDirectoryJob::processFileAnalyzeLocalInfo(
item->_type = localEntry.isDirectory ? ItemTypeDirectory : localEntry.isVirtualFile ? ItemTypeVirtualFile : ItemTypeFile;
_childModified = true;
- auto postProcessLocalNew = [item, localEntry, this]() {
+ auto postProcessLocalNew = [item, localEntry, path, this]() {
if (localEntry.isVirtualFile) {
- // Remove the spurious file if it looks like a placeholder file
- // (we know placeholder files contain " ", but only in the suffix case)
- if (localEntry.size <= 1 || !isVfsWithSuffix()) {
- qCWarning(lcDisco) << "Wiping virtual file without db entry for" << _currentFolder._local + "/" + localEntry.name;
+ const bool isPlaceHolder = _discoveryData->_syncOptions._vfs->isDehydratedPlaceholder(_discoveryData->_localDir + path._local);
+ if (isPlaceHolder) {
+ qCWarning(lcDisco) << "Wiping virtual file without db entry for" << path._local;
item->_instruction = CSYNC_INSTRUCTION_REMOVE;
item->_direction = SyncFileItem::Down;
} else {
- qCWarning(lcDisco) << "Virtual file without db entry for" << _currentFolder._local << localEntry.name
+ qCWarning(lcDisco) << "Virtual file without db entry for" << path._local
<< "but looks odd, keeping";
item->_instruction = CSYNC_INSTRUCTION_IGNORE;
}