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

            Bug ID: 507278
           Summary: Can not access remote root directory (/) via SFTP
    Classification: Frameworks and Libraries
           Product: frameworks-kio
      Version First 6.16.0
       Reported In:
          Platform: Arch Linux
               URL: https://invent.kde.org/frameworks/kio/-/merge_requests
                    /1921
                OS: Linux
            Status: REPORTED
          Keywords: regression
          Severity: normal
          Priority: NOR
         Component: general
          Assignee: kio-bugs-n...@kde.org
          Reporter: i.r.e.c.c.a.k.u.n+bugs.kde....@gmail.com
                CC: akse...@akselmo.dev, kdelibs-b...@kde.org
  Target Milestone: ---

SUMMARY

KIO 6.16.0 has broke ability to access remote root (/) directory via SFTP.
User's home dir is always shown instead.

STEPS TO REPRODUCE
1. Connect to any SFTP server via Dolphin and navigate to the root directory,
e.g. 'sftp://user@server//'.

OBSERVED RESULT

User's home dir always shown instead of /.

EXPECTED RESULT

/ should be accessible.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Arch Linux
KDE Plasma Version: 6.4.3
KDE Frameworks Version: 6.16.0
Qt Version: 6.9.1

ADDITIONAL INFORMATION

I performed bisection and found the offending commit:

commit 883a16eb4ac808deceddf8ac3667ee888ff8ea60 (HEAD)
Author: Akseli Lahtinen <akse...@akselmo.dev>
Date:   Wed Jun 25 13:23:07 2025 +0300

    KCoreDirLister: Clean up the trailing slash as expected on remote systems

    Due to QTBUG-35921 we sometimes get a trailing slash even if we expect
    it to be removed.
    This patch adds a method that makes sure the trailing slash is
    completely removed from the URL
    and returns the cleaned URL, but only if the file is in remote directoy.

    The code was built around the behavior of the trailing
    slash always being removed, so it was comparing URLs:
    Even if the URLs point to same location, `smb://aaa` and `smb://aaa/`,
    the URLs are considered as different ones.

    On remote systems we do not know if the file system allows `foo/bar` and
    `foo/bar/` to be the exact same or not. On local systems we can rely on
    Qt.

    This fixes bug that would cause situations where the job is reusing
    itself for the two "different" URLs (from the point of view of the code)
    and asserting, as every different URL should have a new job.

    BUG: 451050

 src/core/kcoredirlister.cpp | 70
++++++++++++++++++++++++++++++++++++++++++----------------------------
 src/core/kcoredirlister_p.h | 10 ++++++++++
 2 files changed, 52 insertions(+), 28 deletions(-)

Introduced in https://invent.kde.org/frameworks/kio/-/merge_requests/1921

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

Reply via email to