Bug 481842 - Dolphin allows creating or renaming to a filename containing "/"
Summary: Dolphin allows creating or renaming to a filename containing "/"
Status: RESOLVED INTENTIONAL
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords: qt6
Depends on:
Blocks:
 
Reported: 2024-02-26 04:23 UTC by Jin Liu
Modified: 2024-02-26 16:34 UTC (History)
2 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 Jin Liu 2024-02-26 04:23:55 UTC
SUMMARY
E.g. a filename "a/b".
Linux kernel allows that, but it's difficult to handle the file in shells. E.g. "rm a/b" fails. ("rm *" works though)

STEPS TO REPRODUCE
1. Right click, New, Text file.
2. Enter "a/b".

OBSERVED RESULT
A file named "a/b" is created.

EXPECTED RESULT
Dolphin should not allow that name.

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 6.0.80
KDE Frameworks Version: 6.0.0
Qt Version: 6.6.2
Kernel Version: 6.7.6-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 12 × AMD Ryzen 5 5600H with Radeon Graphics
Memory: 13.5 GiB of RAM
Graphics Processor: AMD Radeon Graphics
Comment 1 fanzhuyifan 2024-02-26 16:24:38 UTC
Humm according to this stackoverflow answer, this should be forbidden by the filesystem, unless it is a character that looks like /.

https://stackoverflow.com/questions/9847288/is-it-possible-to-use-in-a-filename
Comment 2 fanzhuyifan 2024-02-26 16:26:01 UTC
Can reproduce on btrfs when creating text files (dolphin does the right thing and create subfolders when trying to create a new folder called a/b).
Comment 3 fanzhuyifan 2024-02-26 16:34:26 UTC
It is actually U+2044, which you can handle in bash. And that is done explicitly here: https://invent.kde.org/frameworks/kio/-/blob/master/src/core/global.cpp#L116

So I am going to call this intentional for now.