Просмотр исходного кода

SocketAPI: Fix string claiming a folder is a file

Issue #7206
Olivier Goffart 6 лет назад
Родитель
Сommit
2c975b1e70
1 измененных файлов с 2 добавлено и 1 удалено
  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"));