https://bugs.kde.org/show_bug.cgi?id=388071
Bug ID: 388071 Summary: KMountPoint doesn't handle bind mounts correctly, breaks Trash Product: frameworks-kio Version: unspecified Platform: Other OS: Linux Status: UNCONFIRMED Severity: normal Priority: NOR Component: general Assignee: fa...@kde.org Reporter: bugreporte...@protonmail.com CC: kdelibs-b...@kde.org Target Milestone: --- KMountPoint doesn't determine the correct mount point, if there are bind mounts. This breaks the Trash handling, files from other devices are moved to the home directory trash folder instead of the trash folder on the other device. dd if=/dev/zero of=/tmp/test-disk1 bs=1024 count=10000 dd if=/dev/zero of=/tmp/test-disk2 bs=1024 count=10000 mkfs.ext4 /tmp/test-disk1 mkfs.ext4 /tmp/test-disk2 mkdir /mnt/test-disk1 mkdir /mnt/test-disk2 mount -o loop /tmp/test-disk1 /mnt/test-disk1 mount -o loop /tmp/test-disk2 /mnt/test-disk2 mkdir -p /mnt/test-disk1/aaa mkdir -p /mnt/test-disk2/aaa/bbb touch /mnt/test-disk2/aaa/bbb/file mount --bind /mnt/test-disk2/aaa/bbb /mnt/test-disk1/aaa Stat: # stat /mnt/test-disk1 File: /mnt/test-disk1 Size: 1024 Blocks: 2 IO Block: 1024 directory Device: 701h/1793d Inode: 2 Links: 4 # stat /mnt/test-disk2 File: /mnt/test-disk2 Size: 1024 Blocks: 2 IO Block: 1024 directory Device: 702h/1794d Inode: 2 Links: 4 # stat /mnt/test-disk1/aaa/file File: /mnt/test-disk1/aaa/file Size: 0 Blocks: 0 IO Block: 1024 regular empty file Device: 702h/1794d Inode: 13 Links: 1 ------------------------------------------------------ KMountPoint::currentMountPoints(): #include <QDebug> #include <KMountPoint> int main() { const QString origPath = "/mnt/test-disk1/aaa/file"; KMountPoint::Ptr mp = KMountPoint::currentMountPoints().findByPath(origPath); qDebug() << mp->mountPoint(); } ------------------------------------------------------- Which returns: "/mnt/test-disk1/aaa", while the file resides on test-disk2. People complaining about Trash not working correctly: https://www.reddit.com/r/kde/comments/59cefq/are_there_options_to_manage_how_the_trash_is/ -- You are receiving this mail because: You are watching all bug changes.