Bug 409868

Summary: Unexpected behavior when you click on "Suggest new name" button in file conflict dialog if the files names end with a number between parentheses
Product: [Frameworks and Libraries] frameworks-kio Reporter: Patrick Silva <bugseforuns>
Component: Overwrite dialogAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: kdelibs-bugs-null, nate
Priority: NOR    
Version First Reported In: unspecified   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: test files

Description Patrick Silva 2019-07-16 18:03:56 UTC
Created attachment 121559 [details]
test files

STEPS TO REPRODUCE
1. download the attachment and extract it (now you have testfile1.tar.gz and testfile2.tar.gz files)
2. extract testfile1.tar.gz file using Dolphin (right click > Extract > Extract archive here)
3. repeat the previous step with testfile2.tar.gz file ("File already exists" dialog shows up)
4. click on "Suggest new name" button

OBSERVED RESULT
file name in "Rename" field changes from "file (2010).txt" to "file (2011).txt"

EXPECTED RESULT
file name in "Rename" field changes from "file (2010).txt" to "file (2010) (1).txt"

SOFTWARE/OS VERSIONS
Operating System: Arch Linux 
KDE Plasma Version: 5.16.3
KDE Frameworks Version: 5.60.0
Qt Version: 5.13.0
Comment 1 Christoph Feck 2019-08-05 19:27:22 UTC
And on collision for "file (2010) (1).txt" you want "file (2010) (1) (1).txt"?
Comment 2 Patrick Silva 2019-08-05 19:40:04 UTC
(In reply to Christoph Feck from comment #1)
> And on collision for "file (2010) (1).txt" you want "file (2010) (1)
> (1).txt"?

yes
Comment 3 Christoph Feck 2019-08-05 20:56:57 UTC
Well, then there would be no need for a number, if it is never increased. The intention is to automatically get numbered files on mass collisions, i.e. when you choose "Apply to All".

Anyway, more options for the automatic name generation were already requested at bug 404559. Letting kio maintainers decide if it is worth to add some configuration here.
Comment 4 Christoph Feck 2019-08-05 20:58:47 UTC
Actually I believe that not using incrementing numbers is a problem because of Linux filename length limit.