https://bugs.kde.org/show_bug.cgi?id=479578
Bug ID: 479578 Summary: Import errors claiming imported path is already part of album path Classification: Applications Product: digikam Version: 8.1.0 Platform: NixOS OS: Linux Status: REPORTED Severity: normal Priority: NOR Component: Import-Albums Assignee: digikam-bugs-n...@kde.org Reporter: kde.bugtracking.r0jwh...@likeablefirm.com Target Milestone: --- SUMMARY When importing a path that contains the album path, the import fails. If ~/albums were my albums folder and I wanted to import ~/albums-not-yet-imported, the import would fail since the first part of the path of the folder I want to import is the same as the albums path. STEPS TO REPRODUCE 1. Create an album at path ./repro/album 2. Create another folder ./repro/album-not-yet-imported 3. Try to import album-not-yet-imported into album OBSERVED RESULT Import fails EXPECTED RESULT Import should succeed SOFTWARE/OS VERSIONS Linux/KDE Plasma: NixOS (available in About System) KDE Plasma Version: 5.27.10 KDE Frameworks Version: 5.112.0 Qt Version: 5.15.11 ADDITIONAL INFORMATION The bug is at core/app/main/digikamapp_import.cpp line 162 where a simple contains function is used so that any path which somehow contains the album path gets refused. The fix would be to use a check that understands paths. A fix could be converting to canonical or absolute paths and then doing a comparison that understands "directory boundaries" (like / or \). I was running 8.1.0 when the bug occurred, but it's present in the master branch right now (2024-01-09 9136a01a335e8c4be4c3d0a58c7942d7a4e5360a) -- You are receiving this mail because: You are watching all bug changes.