Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nautilus plugin - symbolic links give problems with registered paths #1948

Closed
veddox opened this issue May 2, 2020 · 2 comments
Closed

Nautilus plugin - symbolic links give problems with registered paths #1948

veddox opened this issue May 2, 2020 · 2 comments

Comments

@veddox
Copy link
Contributor

veddox commented May 2, 2020

I have an NTFS data partition mounted under /media/DATA. For convenience, /home/<user>/Documents symlinks to this directory, and the NC client has /home/<user>/Documents set up as the synchronisation folder.

Synchronisation works fine, but the Nautilus plugin does not recognise /home/<user>/Documents as a registered path, therefore does not display overlay icons or menu options. It does, however, recognise /media/DATA as a registered path. So if I navigate to one of my documents folders via my home directory, I don't see any NC icons, but if I go to the exact same folder via /media/DATA, I do.

Expected behaviour

The NC Nautilus plugin should recognise /home/<user>/Documents as being a symbolic link pointing to /media/DATA, and display overlay icons and menu options in both locations.

Actual behaviour

Only the "hard path" is recognised, the symbolic link is not (although nextcloud.cfg explicitly defines localPath=/home/<user>/Documents/).

Client configuration

Client version: 2.6.2-1build1

Operating system: Ubuntu 20.04

OS language: English

Qt version used by client package (Linux only, see also Settings dialog): Using Qt 5.12.8, built against Qt 5.12.5

Client package (From Nextcloud or distro) (Linux only): nextcloud-desktop (distro package)

Installation path of client: /usr/bin/nextcloud, /usr/share/nextcloud/

@veddox
Copy link
Contributor Author

veddox commented May 2, 2020

The issue is probably with the use of QFileInfo::canonicalFilePath() in the FolderMan.cpp class:

static QString canonicalPath(const QString &path)

This strips out all symlinks, changing them to absolute paths.

@veddox
Copy link
Contributor Author

veddox commented May 2, 2020

Solution: the Nautilus client has to resolve symlinks too. Patch submitted.

@veddox veddox closed this as completed May 2, 2020
backportbot-nextcloud bot pushed a commit that referenced this issue May 4, 2020
Fixes issue #1948: #1948
The client already resolves symlinks when adding new paths to the
sync-list, but the Nautilus plugin did not do this yet, causing it
to not recognise synced folders if they were accessed via a symlink.

Signed-off-by: Daniel Vedder <d.vedder@web.de>
PraMiD pushed a commit to PraMiD/nextcloud-desktop that referenced this issue Dec 30, 2020
Fixes issue nextcloud#1948: nextcloud#1948
The client already resolves symlinks when adding new paths to the
sync-list, but the Nautilus plugin did not do this yet, causing it
to not recognise synced folders if they were accessed via a symlink.

Signed-off-by: Daniel Vedder <d.vedder@web.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant