ItemTypeSoftLink = 1,
ItemTypeDirectory = 2,
ItemTypeSkip = 3,
+
+ /** The file is a dehydrated placeholder, meaning data isn't available locally */
ItemTypeVirtualFile = 4,
+
+ /** A ItemTypeVirtualFile that wants to be hydrated.
+ *
+ * Actions may put this in the db as a request to a future sync.
+ * For some vfs plugins the placeholder files on disk may be marked for
+ * dehydration (like with a file attribute) and then the local discovery
+ * will return this item type.
+ */
ItemTypeVirtualFileDownload = 5,
+
+ /** A ItemTypeFile that wants to be dehydrated.
+ *
+ * May exist in db or local files, similar to ItemTypeVirtualFileDownload.
+ */
ItemTypeVirtualFileDehydration = 6,
};
<< " | checksum: " << dbEntry._checksumHeader << "//" << serverEntry.checksumHeader
<< " | perm: " << dbEntry._remotePerm << "//" << serverEntry.remotePerm
<< " | fileid: " << dbEntry._fileId << "//" << serverEntry.fileId
- << " | inode: " << dbEntry._inode << "/" << localEntry.inode << "/";
+ << " | inode: " << dbEntry._inode << "/" << localEntry.inode << "/"
+ << " | type: " << dbEntry._type << "/" << localEntry.type << "/" << (serverEntry.isDirectory ? ItemTypeDirectory : ItemTypeFile);
if (_discoveryData->isRenamed(path._original)) {
qCDebug(lcDisco) << "Ignoring renamed";
// server-side nothing has changed
// NOTE: Normally setting the VirtualFileDownload flag means that local and
// remote will be rediscovered. This is just a fallback.
- if (_queryServer == ParentNotChanged && dbEntry._type == ItemTypeVirtualFileDownload) {
+ if (_queryServer == ParentNotChanged
+ && (dbEntry._type == ItemTypeVirtualFileDownload
+ || localEntry.type == ItemTypeVirtualFileDownload)) {
item->_direction = SyncFileItem::Down;
item->_instruction = CSYNC_INSTRUCTION_NEW;
item->_type = ItemTypeVirtualFileDownload;
item->_direction = SyncFileItem::Down;
item->_modtime = serverEntry.modtime;
item->_size = serverEntry.size;
- } else if (dbEntry._type == ItemTypeVirtualFileDownload) {
+ } else if (dbEntry._type == ItemTypeVirtualFileDownload || localEntry.type == ItemTypeVirtualFileDownload) {
item->_direction = SyncFileItem::Down;
item->_instruction = CSYNC_INSTRUCTION_NEW;
item->_type = ItemTypeVirtualFileDownload;
if (noServerEntry) {
item->_instruction = CSYNC_INSTRUCTION_REMOVE;
item->_direction = SyncFileItem::Down;
- } else if (dbEntry._type == ItemTypeVirtualFileDehydration) {
+ } else if (dbEntry._type == ItemTypeVirtualFileDehydration || localEntry.type == ItemTypeVirtualFileDehydration) {
item->_direction = SyncFileItem::Down;
item->_instruction = CSYNC_INSTRUCTION_NEW;
item->_type = ItemTypeVirtualFileDehydration;
i.isDirectory = dirent->type == ItemTypeDirectory;
i.isHidden = dirent->is_hidden;
i.isSymLink = dirent->type == ItemTypeSoftLink;
- i.isVirtualFile = dirent->type == ItemTypeVirtualFile;
+ i.isVirtualFile = dirent->type == ItemTypeVirtualFile || dirent->type == ItemTypeVirtualFileDownload;
+ i.type = dirent->type;
_localNormalQueryEntries.push_back(i);
}
csync_vio_local_closedir(dh);