Skip to content

Commit

Permalink
Fix sharePath for virtual paths using suffix vfs mode
Browse files Browse the repository at this point in the history
Signed-off-by: Claudio Cambra <[email protected]>
  • Loading branch information
claucambra authored and mgallien committed Jun 28, 2024
1 parent 17fcf14 commit 13afc6f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/gui/filedetails/sharemodel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
#include "sharepermissions.h"
#include "theme.h"
#include "updatee2eefolderusersmetadatajob.h"
#include "wordlist.h"

namespace {

Expand Down Expand Up @@ -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();

Expand Down

0 comments on commit 13afc6f

Please sign in to comment.