зеркало из https://github.com/nextcloud/desktop.git
Fix usePlaceholders migration
This commit is contained in:
Родитель
58bc9e837c
Коммит
0eb8b01f0a
|
@ -122,17 +122,18 @@ Folder::Folder(const FolderDefinition &definition,
|
|||
// Potentially upgrade suffix vfs to windows vfs
|
||||
ENFORCE(_vfs);
|
||||
if (_definition.virtualFilesMode == Vfs::WithSuffix
|
||||
&& _definition.upgradeVfsMode
|
||||
&& isVfsPluginAvailable(Vfs::WindowsCfApi)) {
|
||||
if (auto winvfs = createVfsFromPlugin(Vfs::WindowsCfApi)) {
|
||||
// Wipe the existing suffix files from fs and journal
|
||||
SyncEngine::wipeVirtualFiles(path(), _journal, *_vfs);
|
||||
&& _definition.upgradeVfsMode) {
|
||||
if (isVfsPluginAvailable(Vfs::WindowsCfApi)) {
|
||||
if (auto winvfs = createVfsFromPlugin(Vfs::WindowsCfApi)) {
|
||||
// Wipe the existing suffix files from fs and journal
|
||||
SyncEngine::wipeVirtualFiles(path(), _journal, *_vfs);
|
||||
|
||||
// Then switch to winvfs mode
|
||||
_vfs.reset(winvfs.release());
|
||||
_definition.virtualFilesMode = Vfs::WindowsCfApi;
|
||||
saveToSettings();
|
||||
// Then switch to winvfs mode
|
||||
_vfs.reset(winvfs.release());
|
||||
_definition.virtualFilesMode = Vfs::WindowsCfApi;
|
||||
}
|
||||
}
|
||||
saveToSettings();
|
||||
}
|
||||
|
||||
// Initialize the vfs plugin
|
||||
|
|
|
@ -299,7 +299,6 @@ void FolderMan::setupFoldersHelper(QSettings &settings, AccountStatePtr account,
|
|||
&& settings.value(QLatin1String("usePlaceholders"), false).toBool()) {
|
||||
qCInfo(lcFolderMan) << "Migrate: From usePlaceholders to PinState::OnlineOnly";
|
||||
f->setRootPinState(PinState::OnlineOnly);
|
||||
settings.remove(QStringLiteral("usePlaceholders"));
|
||||
}
|
||||
|
||||
// Migration: Mark folders that shall be saved in a backwards-compatible way
|
||||
|
|
Загрузка…
Ссылка в новой задаче