From 13afc6f7e113c27e5194b850c676ccd4177b8c3d Mon Sep 17 00:00:00 2001 From: Claudio Cambra Date: Sat, 8 Jun 2024 00:10:15 +0800 Subject: [PATCH] Fix sharePath for virtual paths using suffix vfs mode Signed-off-by: Claudio Cambra --- src/gui/filedetails/sharemodel.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gui/filedetails/sharemodel.cpp b/src/gui/filedetails/sharemodel.cpp index d44c2837ef8c6..ff849b84fb346 100644 --- a/src/gui/filedetails/sharemodel.cpp +++ b/src/gui/filedetails/sharemodel.cpp @@ -26,7 +26,6 @@ #include "sharepermissions.h" #include "theme.h" #include "updatee2eefolderusersmetadatajob.h" -#include "wordlist.h" namespace { @@ -264,6 +263,12 @@ void ShareModel::updateData() resharingAllowed = false; } + if (fileRecord.isVirtualFile() && _synchronizationFolder->vfs().mode() == Vfs::WithSuffix) { + if (const auto suffix = _synchronizationFolder->vfs().fileSuffix(); !suffix.isEmpty() && _sharePath.endsWith(suffix)) { + _sharePath.chop(suffix.length()); + } + } + _maxSharingPermissions = resharingAllowed ? SharePermissions(_accountState->account()->capabilities().shareDefaultPermissions()) : SharePermissions({}); Q_EMIT sharePermissionsChanged();