Skip to content

fix(folderwizard): honour the virtual files checkbox on Linux - #11202

Open
fwuerrer wants to merge 1 commit into
nextcloud:masterfrom
fwuerrer:fix/linux-vfs-checkbox-folder-wizard
Open

fwuerrer wants to merge 1 commit into
nextcloud:masterfrom
fwuerrer:fix/linux-vfs-checkbox-folder-wizard

Conversation

@fwuerrer

@fwuerrer fwuerrer commented Nov 2, 2026

Copy link
Copy Markdown

Summary

FolderWizardSelectiveSync::validatePage() only honoured the "Use virtual files instead of downloading content immediately" checkbox when the best available VFS mode was WindowsCfApi:

const bool useVirtualFiles = (mode == Vfs::WindowsCfApi) && (_virtualFilesCheckBox && _virtualFilesCheckBox->isChecked());

On Linux the best available mode is Vfs::OpenVFS, so useVirtualFiles was always false, the wizard reported useVirtualFiles=false and AccountSettings::slotFolderWizardAccepted() left FolderDefinition::virtualFilesMode at Vfs::Off. The checkbox is shown on Linux (it is a QCheckBox created whenever bestAvailableVfsMode() != Vfs::Off), so the user could tick it and it was silently ignored — the folder was created as a classic sync folder and everything was downloaded.

Fixes #11096.

Change

Accept the checkbox for every available VFS mode and let the existing Vfs::checkAvailability() call in the same function validate the selected location, instead of hard coding the Windows mode:

const bool useVirtualFiles = (mode != Vfs::Off) && (_virtualFilesCheckBox && _virtualFilesCheckBox->isChecked());

How to test

  1. Linux with the OpenVFS plugin available (fuse3 + config installed).
  2. Account settings → Add folder sync connection → tick Use virtual files … → finish.
  3. The folder is now created with virtualFilesMode=openvfs and the files show up as placeholders instead of being downloaded.
  4. Enabling virtual files afterwards in the folder settings behaves identically to before.

Without the patch the tick is discarded and the whole folder is downloaded, exactly as reported in #11096.

Notes

This very likely also addresses #11193: the "> 500 MB" and external storage exclusions are already disabled for VFS folders (DiscoveryPhase::activeFolderSizeLimit() / checkSelectiveSyncNewFolder() return early when the VFS mode is not Off), they only appeared because such folders were created without VFS at all. I would still like that one to be confirmed by the reporter before closing it.

FolderWizardSelectiveSync::validatePage() only accepted the "use virtual
files instead of downloading content immediately" checkbox when the best
available VFS mode was WindowsCfApi. On Linux the best available mode is
OpenVFS, so the tick was silently discarded: the folder was created as a
classic sync folder and the client downloaded all files immediately,
although the user had selected virtual files.

Use the mode that was actually detected and let Vfs::checkAvailability()
validate it, instead of hard coding the Windows mode.

Fixes nextcloud#11096
Refs nextcloud#11193

Signed-off-by: fwuerrer <fwuerrer@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Linux VFS: Creating new folder sync with VFS fails

2 participants