Bug 492660

Summary: Renaming multiple files removes file extension for unknown file types
Product: [Applications] dolphin Reporter: Tarulia <mihawk.90+kdebugs>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: REPORTED ---    
Severity: normal CC: kfm-devel
Priority: NOR    
Version: 24.08.0   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Tarulia 2024-09-04 19:42:01 UTC
SUMMARY
While renaming some of my media files I noticed that on one specific combination of files, Dolphin would remove the file extension on one of the files. I can consistently reproduce this with test files, but on different file types it seems fine. It *might* have to do with unknown/unassigned file extensions.

STEPS TO REPRODUCE
1. touch file.idx file.sub
2. Select both files in Dolphin
3. F2 or Right-Click -> Rename
4. Enter a new name, e.g. "test" (no # since there's no counter required)
5. Hit Rename

OBSERVED RESULT
$ ls
test
test.sub

EXPECTED RESULT
Dolphin should keep the file extension in all cases, i.e. correct would be:
$ ls
test.idx
test.sub

SOFTWARE/OS VERSIONS
Operating System: Fedora Linux 40 (KDE Spin)
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2

ADDITIONAL INFORMATION
I tried the same with a couple other file extensions:
mkv & mp4 -> fine
log & txt -> fine
jpg & gif
ext1 & ext2 -> would not allow me to rename without adding a counter, when adding a counter it removes both file extensions
idx & sub (see above) -> idx is an "unknown" filetype i.e. right click brings up the "Open With…" option, while the sub file is recognised as a text file and brings up "Open With KWrite"