SUMMARY System journal has the following warnings: kioworker: kf.kio.workers.trash: Root trash dir "/\u0000/.Trash" exists but didn't pass the security checks, can't use it kioworker: kf.kio.workers.trash: Directory "/\u0000/.Trash-1000" exists but didn't pass the security checks, can't use it I checked that the dir "/\u0000/.Trash" doesn't exist. So probably KIO actually tries to use the NUL(\u0000)-terminated path "/" as the trash dir. SOFTWARE/OS VERSIONS Operating System: Arch Linux KDE Plasma Version: 5.91.0 KDE Frameworks Version: 5.247.0 Qt Version: 6.7.0 Kernel Version: 6.6.7-arch1-1 (64-bit) Graphics Platform: offscreen Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics Memory: 13.5 GiB of RAM Graphics Processor: AMD Radeon Graphics
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/solid/-/merge_requests/154
I've located the source of this bug, but I can't decide how to fix it. There are two problems: 1. Solid::StorageAccess::filePath() returns `/\u0000` for encrypted root partition. Should be fixed in https://invent.kde.org/frameworks/solid/-/merge_requests/154 2. In KIO: https://invent.kde.org/frameworks/kio/-/blob/287aa2ab7c3277b5d5033952569c38bb308a6154/src/kioworkers/trash/trashimpl.cpp#L1053 The query to Solid returns both the encryped root partition and the devicemapper. And after the fix above, their filepath() should both resolve to `/`. This doesn't really cause problems here, but is it intentional? a) Should the `Solid::Device::listFromQuery(QStringLiteral("StorageAccess.accessible == true"))` query, by design, return both devices? b) If a) is true, then should KIO somehow explicitly filter out the encrypted partition?
Git commit 762c62524c3e91ce21b6dfe7c349eca577269009 by Jin Liu, on behalf of Jin Liu. Committed on 08/01/2024 at 08:35. Pushed by genericity into branch 'master'. Fix: StorageAccess::filePath() returns /\u0000 for encrypted root M +5 -1 src/solid/devices/backends/udisks2/udisksstorageaccess.cpp https://invent.kde.org/frameworks/solid/-/commit/762c62524c3e91ce21b6dfe7c349eca577269009