Skip to content

Commit b12f611

Browse files
committed
SocketApi: Don't assume read-only folder when permissions are not known
Issue #7330
1 parent 368c19b commit b12f611

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/gui/socketapi.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -938,8 +938,8 @@ void SocketApi::command_GET_MENU_ITEMS(const QString &argument, OCC::SocketListe
938938
QFileInfo fileInfo(fileData.localPath);
939939
auto parentDir = fileData.parentFolder();
940940
auto parentRecord = parentDir.journalRecord();
941-
bool canAddToDir =
942-
(fileInfo.isFile() && !parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddFile))
941+
bool canAddToDir = parentRecord._remotePerm.isNull()
942+
|| (fileInfo.isFile() && !parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddFile))
943943
|| (fileInfo.isDir() && !parentRecord._remotePerm.hasPermission(RemotePermissions::CanAddSubDirectories));
944944
bool canChangeFile =
945945
!isOnTheServer

0 commit comments

Comments
 (0)