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
  • Loading branch information
claucambra committed Jun 7, 2024
1 parent 5e9c7db commit ed583d5
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 @@ -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();

Expand Down

0 comments on commit ed583d5

Please sign in to comment.