Bug 502794

Summary: Entering a folder replaces the to-be-saved filename with the folder's name
Product: [Frameworks and Libraries] frameworks-kio Reporter: Nate Graham <nate>
Component: Open/save dialogsAssignee: KIO Bugs <kio-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: akselmo, kdelibs-bugs-null
Priority: NOR Keywords: regression
Version First Reported In: git master   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In: 6.14
Sentry Crash Report:

Description Nate Graham 2025-04-14 15:23:42 UTC
Current git master

STEPS TO REPRODUCE
1. Open KWrite
2. Save As/Ctrl+Shift+S
3. Type a filename in the Name field
4. Click a folder in the file view to enter that folder

OBSERVED RESULT
The filename is replaced with the folder name!

EXPECTED RESULT
That doesn't happen; the filename only gets replaced when clicking on the name of a *file* not a folder.
Comment 1 Akseli Lahtinen 2025-04-15 09:01:20 UTC
Can reproduce
Comment 2 Bug Janitor Service 2025-04-15 10:02:17 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/1866
Comment 3 Akseli Lahtinen 2025-04-17 08:43:30 UTC
Git commit cd0810f82d9fce629fa27e2a1d330fbcc8d2edf6 by Akseli Lahtinen.
Committed on 17/04/2025 at 08:43.
Pushed by akselmo into branch 'master'.

KFileWidget: Do not override filename with folder name if edited

If the filename input has been modified, do not override it with
the name of the folder when selecting a folder.
FIXED-IN: 6.14

M  +85   -0    autotests/kfilewidgettest.cpp
M  +1    -0    src/filewidgets/kdiroperator.h
M  +4    -0    src/filewidgets/kfilewidget.cpp

https://invent.kde.org/frameworks/kio/-/commit/cd0810f82d9fce629fa27e2a1d330fbcc8d2edf6