From 531e01d574fdb5581c3c440b28b58f49eedf4b5b 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 2ec91830698b2..078e3ccb4a396 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 { @@ -265,6 +264,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();