Vfs: Fix folder dehydration requests on OSX #6977

Since the rename is triggered by the client process the folder watcher
didn't pick up on it on OSX.

This does not need to be merged into master.
This commit is contained in:
Christian Kamm 2019-02-15 08:18:58 +01:00 committed by ckamm
parent 9e66347be0
commit 95e7720864

View File

@ -665,13 +665,13 @@ void SocketApi::command_REPLACE_VIRTUAL_FILE(const QString &filesArg, SocketList
qCWarning(lcSocketApi) << "Unable to rename " << file;
}
});
continue;
}
SyncJournalFileRecord record;
if (!folder->journalDb()->getFileRecord(relativePath, &record) || !record.isValid())
continue;
if (!FileSystem::rename(file, file + suffix)) {
qCWarning(lcSocketApi) << "Unable to rename " << file;
} else {
SyncJournalFileRecord record;
if (!folder->journalDb()->getFileRecord(relativePath, &record) || !record.isValid())
continue;
if (!FileSystem::rename(file, file + suffix)) {
qCWarning(lcSocketApi) << "Unable to rename " << file;
}
}
folder->slotWatchedPathChanged(file); // make sure it is in the _localDiscoveryTracker list
FolderMan::instance()->scheduleFolder(folder);