Bug 505399 - dolphin does not update content if "[" in the path
Summary: dolphin does not update content if "[" in the path
Status: CONFIRMED
Alias: None
Product: frameworks-kio
Classification: Frameworks and Libraries
Component: general (other bugs)
Version First Reported In: 6.13.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KIO Bugs
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-06-09 23:03 UTC by Misha Labjuk
Modified: 2025-06-15 22:30 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Misha Labjuk 2025-06-09 23:03:21 UTC
Inotify notification lost and directory view does not update if path contains bracket symbol "[". 


STEPS TO REPRODUCE
1.  Create directory with [ in the name
2.  Open directory in dolphin
3.  Create file in other application


OBSERVED RESULT
Dolphin does not show created file.

EXPECTED RESULT
Directory view shows created file without explicit refresh.

SOFTWARE/OS VERSIONS
Operating System: Gentoo Linux 2.17
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.3
Kernel Version: 6.12.31-gentoo (64-bit)
Graphics Platform: Wayland


ADDITIONAL INFORMATION

QT_LOGGING_RULES="kf.kio.core.dirlister.debug=true;kf.coreaddons.kdirwatch.debug=true" QT_FORCE_STDERR_LOGGING=1 dolphin

For directory with "["

kf.coreaddons.kdirwatch: got event "CREATE" for entry "/home/user/Videos/[" [file] "aaa.ttt"
kf.coreaddons.kdirwatch: -->got CREATE signal for "/home/user/Videos/[/aaa.ttt" sub_entry= 0x0
kf.kio.core.dirlister: "/home/user/Videos/["
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user/Videos/%5B")  not in cache.
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user/Videos")  not in cache.
kf.kio.core.dirlister: "/home/user/Videos/["
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user/Videos/%5B")  not in cache.
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user/Videos")  not in cache.


For directory without "["

kf.coreaddons.kdirwatch: got event "CREATE" for entry "/home/user/Videos" [file] "bbb.txt"
kf.coreaddons.kdirwatch: -->got CREATE signal for "/home/user/Videos/bbb.txt" sub_entry= 0x0
kf.kio.core.dirlister: "/home/user/Videos"
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user")  not in cache.
kf.kio.core.dirlister: "/home/user/Videos"
kf.kio.core.dirlister: aborted, directory  QUrl("file:///home/user")  not in cache.
kf.kio.core.dirlister: QUrl("file:///home/user/Videos")
kf.kio.core.dirlister: QUrl("file:///home/user/Videos") listers= QList() holders= QList(KDirLister(0x5d698c57f700))
kf.kio.core.dirlister: Killed= false
kf.kio.core.dirlister: update started in QUrl("file:///home/user/Videos")
kf.kio.core.dirlister: finished update QUrl("file:///home/user/Videos")
kf.kio.core.dirlister: new file: "bbb.txt"
kf.kio.core.dirlister: in QUrl("file:///home/user/Videos") item: QUrl("file:///home/user/Videos/bbb.txt")
Comment 1 TraceyC 2025-06-10 22:07:08 UTC
I confirmed this on git-master Plasma with Dolphin from git-master 25.07.70
Comment 2 Misha Labjuk 2025-06-15 21:29:45 UTC
Issue caused by inconsistency between initialization QUrl from QString via constrictor and QUrl::fromLocalFile()

I case of using QUrl::fromLocalFile()  '[' and ']' symbols are escaped and same path does not match anymore.

I've done some tests with adding  fromLocalFile() to KCoreDirListerCache class to fix issue. But I'm not sure is it a correct way or not.