PSA: Data loss on remote mount when using rmdir in dolphin terminal

I just lost a fair amount of data (luckily non-critical) because dolphin in 5.x (I checked three recent versions) behaves in the following manner:

  • If a remote directory is not explored, it appears empty within the filesystem (displaying 0 items)

  • 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.

This is not so much a bug report (although certainly if KDE 6 exhibits this behavior I will file it), as a community warning about potential data loss. I am currently searching in another tab to see if it is already up on bugs.kde.org, and trying to determine what classification to use.

1 Like

As an update, I filed the bug, it was bumped to Critical, and there’s a patch submitted. Several people responded quite quickly on this.

The bug for the interested.

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

Specifically rmdir should remove only empty directories.

Ah, it’s kio, fuse, sftp and all that goodie stuff, rmdir the gnu application I found hard to believe is bugged.
Thank you for the clarification, and good choice to remove my post. :slight_smile: