Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2022-07-01 15:23:28 +0300
committerHannah von Reth <vonreth@kde.org>2022-07-05 09:54:53 +0300
commit3e14eefb263c7d838d12c46aabf8f546ac999155 (patch)
treecf8a2a0c2ca663f42884d62724b87de6332d47b2 /src
parent9d9003496ff6c0550a3aea266ae44484a917ce4f (diff)
Fix read only condition
Fixes: #9574
Diffstat (limited to 'src')
-rw-r--r--src/gui/socketapi/socketapi.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp
index dc983bfad..08dc99c0b 100644
--- a/src/gui/socketapi/socketapi.cpp
+++ b/src/gui/socketapi/socketapi.cpp
@@ -1040,9 +1040,9 @@ void SocketApi::command_GET_MENU_ITEMS(const QString &argument, OCC::SocketListe
const QFileInfo fileInfo(fileData.localPath);
const auto parentDir = fileData.parentFolder();
const auto parentRecord = parentDir.journalRecord();
- const bool canAddToDir = parentRecord._remotePerm.isNull()
- || (fileInfo.isFile() && !parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddFile))
- || (fileInfo.isDir() && !parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddSubDirectories));
+ const bool canAddToDir = !parentRecord._remotePerm.isNull()
+ && ((fileInfo.isFile() && parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddFile))
+ || (fileInfo.isDir() && parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddSubDirectories)));
const bool canChangeFile =
!isOnTheServer
|| (record._remotePerm.hasPermission(RemotePermissions::CanDelete)