Quellcode durchsuchen

SocketAPI: Fix string claiming a folder is a file

Issue #7206
Olivier Goffart vor 6 Jahren
Ursprung
Commit
2c975b1e70
1 geänderte Dateien mit 2 neuen und 1 gelöschten Zeilen
  1. 2 1
      src/gui/socketapi.cpp

+ 2 - 1
src/gui/socketapi.cpp

@@ -876,7 +876,8 @@ void SocketApi::sendSharingContextMenuOptions(const FileData &fileData, SocketLi
     // If sharing is globally disabled, do not show any sharing entries.
     // If there is no permission to share for this file, add a disabled entry saying so
     if (isOnTheServer && !record._remotePerm.isNull() && !record._remotePerm.hasPermission(RemotePermissions::CanReshare)) {
-        listener->sendMessage(QLatin1String("MENU_ITEM:DISABLED:d:") + tr("Resharing this file is not allowed"));
+        listener->sendMessage(QLatin1String("MENU_ITEM:DISABLED:d:") + (!record.isDirectory()
+            ? tr("Resharing this file is not allowed") : tr("Resharing this folder is not allowed")));
     } else {
         listener->sendMessage(QLatin1String("MENU_ITEM:SHARE") + flagString + tr("Share options"));