Bug 492668

Summary: After renaming files on desktop, pressing enter another time to open it errors
Product: [Plasma] plasmashell Reporter: SC <kde>
Component: Desktop icons & Folder View widgetAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: fernandommuniz, goodaqua, hein, nate, notmart
Priority: NOR    
Version: 6.1.4   
Target Milestone: 1.0   
Platform: Arch Linux   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=492447
Latest Commit: Version Fixed In: 6.2.0
Sentry Crash Report:
Attachments: Showcase

Description SC 2024-09-05 06:33:59 UTC
SUMMARY

Trying to open a just-renamed file on the desktop - the file's old path is incorrectly opened, causing an error.

STEPS TO REPRODUCE

1. Create a new file or directory on the desktop, for example `foo.txt`.
2. Select the file, then press F2 to initiate the rename.
3. Type `bar.txt`, press enter, then press enter again to try to open it.
4. Observe the error popup: `The file or folder ~/Desktop/foo.txt does not exist.`
5. Dismiss the error, then immediately press enter again to try to open it.
6. Observe that opening now succeeds (presumably due to a refocus event after dismissing the error).

OBSERVED RESULT

Step 3 errors.

EXPECTED RESULT

Step 3 does not error.

SOFTWARE/OS VERSIONS

Operating System: EndeavourOS 
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.6.48-1-lts (64-bit)
Graphics Platform: X11

ADDITIONAL INFORMATION
Comment 1 Nate Graham 2024-09-05 16:32:58 UTC
Cannot reproduce with those steps on current git master. https://invent.kde.org/plasma/plasma-desktop/-/commit/db0d9c7721061679957dcd60a4391d4a40cee03a may be related, if there is indeed an issue I can't reproduce.

Can you try in a new clean user account to rule out any configuration file weirdnesses? Thanks!
Comment 2 SC 2024-09-06 04:29:17 UTC
> Can you try in a new clean user account to rule out any configuration file
> weirdnesses? Thanks!

Yep. Tried with new user account, same thing.

A few other things I suspected then tried, with no difference observed:
- Wayland vs X11 session
- IME on (fcitx5) vs IME off

I also tried a different computer, also with EndeavourOS. Same behaviour.

I did notice that sometimes, quite randomly, the file can be opened after a rename. But this is the exception rather than the norm. Repeat the rename once or at most twice and this issue will appear.
Comment 3 reports_go_brrr 2024-09-10 18:56:51 UTC
IMPORTANT TO NOTE: With each new try the original first name of file must be different for each attempt, same for name which will be used for renaming. If you will not do that, the bug couldn't be triggered!

Able to reproduce it.

Operating System: Arch Linux
KDE Plasma Version: 6.1.4
KDE Frameworks Version: 6.5.0
Qt Version: 6.7.2
Kernel Version: 6.10.7-arch1-1 (64-bit)
Graphics Platform: Wayland
Comment 4 reports_go_brrr 2024-09-10 19:08:39 UTC
(In reply to reports_go_brrr from comment #3)
> IMPORTANT TO NOTE: With each new try the original first name of file must be
> different for each attempt, same for name which will be used for renaming.
> If you will not do that, the bug couldn't be triggered!
> 
> Able to reproduce it.
> 
> Operating System: Arch Linux
> KDE Plasma Version: 6.1.4
> KDE Frameworks Version: 6.5.0
> Qt Version: 6.7.2
> Kernel Version: 6.10.7-arch1-1 (64-bit)
> Graphics Platform: Wayland

Want to fix myself. There is no need to put random names for files to trigger this bug. It is easier to trigger it under Wayland than on X11.
Comment 5 reports_go_brrr 2024-09-10 19:12:57 UTC
Created attachment 173538 [details]
Showcase
Comment 6 Nate Graham 2024-09-16 15:16:01 UTC
Aha, I get it now, thanks. This is indeed something already fixed in Plasma 6.2.
Comment 7 Nate Graham 2024-09-19 20:22:11 UTC
*** Bug 493353 has been marked as a duplicate of this bug. ***
Comment 8 reports_go_brrr 2024-09-27 21:06:26 UTC
To Nate,
Can you send a link to MR of fix?