Bug 498909

Summary: Autorenaming not working correctly - Files get overwritten after 2 renames
Product: [Applications] kdeconnect Reporter: stephan.laenge
Component: plasmoidAssignee: Albert Vaca Cintora <albertvaka>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version First Reported In: 23.08.5   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description stephan.laenge 2025-01-20 02:01:24 UTC
SUMMARY
When a file with the same name is sent more than 3 times, the third file gets (repeatedly) overwritten.

STEPS TO REPRODUCE
1. Send a file 'F' from PC A to PC B.
2. Observe B receiving 'F'.
3. Resend a file named 'F' from PC A to PC B.
4. Observe 'F (1)' being created.
5. Resend a file named 'F' from PC A to PC B.
6. Observe 'F (2)' being created.
7. Resend a file named 'F' from PC A to PC B.
8. Observe 'F (2)' being overwritten.

OBSERVED RESULT
A existing file is overwritten.

EXPECTED RESULT
A new, unused name is used for the file.

SOFTWARE/OS VERSIONS
PC A:
Operating System: Gentoo Linux 2.17
KDE Plasma Version: 6.2.4
KDE Frameworks Version: 6.7.0
Qt Version: 6.8.1
Kernel Version: 6.6.67-gentoo (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 7700X 8-Core Processor
Memory: 31.1 GiB of RAM
Graphics Processor: AMD Radeon RX 6800 XT

PC B:
Operating System: Kubuntu 24.04
KDE Plasma Version: 5.27.11
KDE Frameworks Version: 5.115.0
Qt Version: 5.15.13
Kernel Version: 6.8.0-51-generic (64-bit)
Graphics Platform: offscreen
Processors: 4 × Intel® Core™ i7-2640M CPU @ 2.80GHz
Memory: 7.7 GiB of RAM
Graphics Processor: Mesa Intel® HD Graphics 3000

ADDITIONAL INFORMATION
Both kdeconnect 23.8.5 and 24.8.3 are affected.