From: Christian Kamm Date: Mon, 12 Nov 2018 10:31:15 +0000 (+0100) Subject: vfs: Allow folders without vfs X-Git-Tag: archive/raspbian/3.16.7-1_deb13u1+rpi1~1^2~12^2~21^2~468^2~403 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=e0ae6012b19a7939067a13f5e0c0afcdc70f60df;p=nextcloud-desktop.git vfs: Allow folders without vfs --- diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 052b37c8e..3f284938c 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -139,24 +139,26 @@ Folder::Folder(const FolderDefinition &definition, } } } - if (!_vfs) { - // ### error handling; possibly earlier than in the ctor - qFatal("Could not load any vfs plugin."); - } + if (_definition.virtualFilesMode != Vfs::Off) { + if (!_vfs) { + // ### error handling; possibly earlier than in the ctor + qFatal("Could not load any vfs plugin."); + } - VfsSetupParams vfsParams; - vfsParams.filesystemPath = path(); - vfsParams.remotePath = remotePath(); - vfsParams.account = _accountState->account(); - vfsParams.journal = &_journal; - vfsParams.providerName = Theme::instance()->appNameGUI(); - vfsParams.providerVersion = Theme::instance()->version(); + VfsSetupParams vfsParams; + vfsParams.filesystemPath = path(); + vfsParams.remotePath = remotePath(); + vfsParams.account = _accountState->account(); + vfsParams.journal = &_journal; + vfsParams.providerName = Theme::instance()->appNameGUI(); + vfsParams.providerVersion = Theme::instance()->version(); - connect(_vfs, &OCC::Vfs::beginHydrating, this, &Folder::slotHydrationStarts); - connect(_vfs, &OCC::Vfs::doneHydrating, this, &Folder::slotHydrationDone); + connect(_vfs, &OCC::Vfs::beginHydrating, this, &Folder::slotHydrationStarts); + connect(_vfs, &OCC::Vfs::doneHydrating, this, &Folder::slotHydrationDone); - _vfs->registerFolder(vfsParams); // Do this always? - _vfs->start(vfsParams); + _vfs->registerFolder(vfsParams); // Do this always? + _vfs->start(vfsParams); + } } Folder::~Folder()