Bug 468234

Summary: Trim trailing/leading whitespace from filenames when renaming file
Product: [Applications] dolphin Reporter: ktchidev <ktchidev>
Component: generalAssignee: Dolphin Bug Assignee <dolphin-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: kfm-devel, ktchidev, p.r.worrall
Priority: NOR    
Version: 22.12.3   
Target Milestone: ---   
Platform: Other   
OS: All   
Latest Commit: Version Fixed In:

Description ktchidev@gmail.com 2023-04-07 09:19:56 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1. Rename a file and put a space at the start or end

OBSERVED RESULT
The filename will be saved as is, with the trailing whitespace

DESIRED RESULT
Users almost certainly don't want to have files with trailing/leading whitespace, and this was likely a typo. This can cause issues with lots of (poorly written) shell scripts, and confusion with end users.

I think it would be significantly more user-friendly if the whitespace was trimmed. Advanced users who *really do* want to create a file with trailing/leading whitespace can still do so via the terminal.

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: 5.15.104-2-MANJARO (64-bit)
(available in About System)
KDE Plasma Version: 5.27.3
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8

It appears this is already fixed for *creating* a file, but wasn't implemented for renaming a file.