https://bugs.kde.org/show_bug.cgi?id=453110

--- Comment #8 from alx.ku...@gmail.com ---
Project: kio-extras ..

This is a proposed change:
diff --git a/activities/KioActivities.cpp b/activities/KioActivities.cpp
index 96a139e68..23691943f 100644
--- a/activities/KioActivities.cpp
+++ b/activities/KioActivities.cpp
@@ -57,8 +57,11 @@ public:
         const auto fullPath = url.adjusted(QUrl::StripTrailingSlash).path();
         const auto path =
QStringView(fullPath).mid(fullPath.startsWith(QLatin1Char('/')) ? 1 : 0);

-        if (activity) {
-            *activity = path.mid(0, path.indexOf(QStringLiteral("/")) -
1).toString();
+        if (activity && path.length() != 0) {
+            if (path.indexOf(QStringLiteral("/"))!=-1)
+                *activity = path.mid(0,
path.indexOf(QStringLiteral("/"))).toString();
+            else
+                *activity = path.toString();
         }

         if (filePath) {

Tested locally. Working as expected in dolphin and folder view.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to