Summary: | KCoreDirLister fails to update for paths containing square brackets | ||
---|---|---|---|
Product: | [Frameworks and Libraries] frameworks-kio | Reporter: | Jin Liu <ad.liu.jin> |
Component: | general | Assignee: | KIO Bugs <kio-bugs-null> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | kdelibs-bugs, thiago |
Priority: | NOR | ||
Version First Reported In: | git master | ||
Target Milestone: | --- | ||
Platform: | Arch Linux | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Jin Liu
2025-04-01 13:32:15 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1854 Git commit 943eae6247f602e0b27c950a50cb2ac5764a3c77 by Jin Liu. Committed on 05/04/2025 at 01:29. Pushed by genericity into branch 'master'. KFileItem/KDirLister: add test for paths with square brackets Qt 6.8.3 (in https://github.com/qt/qtbase/commit/5e936b60fc921e21b8153a83113886a1de333b57) introduced a breaking change in QUrl::fromLocalPath, which now escapes square brackets. But we were using QUrl::setPath() which doesn't escape square brackets. So our url() might be different from the same local path converted by QUrl::fromLocalPath(). This causes KCoreDirLister to not update for paths containing square brackets, as it escapes local URLs from KDirWatch, but not from dir listing, resulting in mismatch. Qt 6.8.2 and 6.9.0 doesn't contain the above change, so they are good. The upcoming release Qt 6.8.4 and 6.9.1 should contain the fix in (https://codereview.qt-project.org/c/qt/qtbase/+/636882) so setPath() would be consistent with fromLocalPath() again. No fix needed on our side. This MR adds tests for this bug. (will be skipped on Qt 6.8.3 / 6.9.0) M +27 -0 autotests/kdirlistertest.cpp M +1 -0 autotests/kdirlistertest.h M +13 -0 autotests/kfileitemtest.cpp M +2 -0 autotests/kfileitemtest.h https://invent.kde.org/frameworks/kio/-/commit/943eae6247f602e0b27c950a50cb2ac5764a3c77 Should be fixed by https://codereview.qt-project.org/c/qt/qtbase/+/636882 |