mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-21 20:45:51 +03:00
Fix usePlaceholders migration
This commit is contained in:
parent
58bc9e837c
commit
0eb8b01f0a
2 changed files with 10 additions and 10 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue