[kiofuse] [Bug 482902] Data loss on remote mount when using rmdir in terminal

Fabian Vogt bugzilla_noreply at kde.org
Fri Mar 8 21:00:40 GMT 2024


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

Fabian Vogt <fabian at ritter-vogt.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |WAITINGFORINFO
            Product|dolphin                     |kiofuse
          Component|panels: terminal            |general
             Status|REPORTED                    |NEEDSINFO
           Assignee|dolphin-bugs-null at kde.org   |a.saoutkin at gmail.com
            Version|23.08.1                     |unspecified
                 CC|                            |fabian at ritter-vogt.de,
                   |                            |kio-bugs-null at kde.org

--- Comment #1 from Fabian Vogt <fabian at ritter-vogt.de> ---
I'm assuming you're using the sftp:// url in dolphin while the terminal sees
the kio-fuse mount, e.g. /run/user/1000/kio-fuse....
Can you post a screenshot of such a situation for clarity?

> 1. If a remote directory is not explored, it appears empty within the filesystem (displaying 0 items in the panel)

Do you mean the terminal panel or the dolphin panel? It's intentional that
directories are not populated unless necessary to avoid potentially slow
network requests.

> 2. If you then use `rmdir *` in the terminal to clear empty directories, leaving those that have files, the remote mounted filesystem has the same structure, so rmdir dutifully removes all directories including all files.

rmdir is supposed to fail on nonempty directories, so the question is which
layer is wrong here. kio-fuse translates the rmdir call on directories to
KIO::del, unless it already knows that it has items. KIO::del appears to do a
recursive deletion by default, which is wrong in this context. For directories,
KIO::rmdir is probably more appropriate.

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the kfm-devel mailing list