| Summary: | Rename function leads to an error when target name is an existing directory | ||
|---|---|---|---|
| Product: | [Applications] kate | Reporter: | Jan K <1n315q681> |
| Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | waqar.17a |
| Priority: | NOR | ||
| Version First Reported In: | 25.04.2 | ||
| Target Milestone: | --- | ||
| Platform: | Other | ||
| OS: | Linux | ||
| Latest Commit: | https://invent.kde.org/utilities/kate/-/commit/5e5238d29e7e0880c45df7ea1078baaa57ca530b | Version Fixed/Implemented In: | |
| Sentry Crash Report: | |||
|
Description
Jan K
2025-07-09 14:11:59 UTC
There is no data loss, the file gets moved in the directory just. A possibly relevant merge request was started @ https://invent.kde.org/utilities/kate/-/merge_requests/1819 Thank you for looking into this. I apologize for my mistake, indeed the file is moved into the directory and not lost. So the actual problem is that the moved file is not re-opened properly afterwards, instead giving an error. Moving could also be considered undesirable when the user only wanted to rename without realizing there is a directory, but this would be a minor issue. Indeed, the move is really unexpected. It makes sense if you think a bit deeper since renaming is just moving a file. Git commit 2e9f41b871d333bcdb7b0ef98a35d214e87263f0 by Christoph Cullmann, on behalf of Waqar Ahmed. Committed on 14/07/2025 at 18:14. Pushed by cullmann into branch 'master'. Use KIO::moveAs to rename file This will error out if there is an existing dir with the same name M +1 -1 apps/lib/katefileactions.cpp https://invent.kde.org/utilities/kate/-/commit/2e9f41b871d333bcdb7b0ef98a35d214e87263f0 Git commit 5e5238d29e7e0880c45df7ea1078baaa57ca530b by Christoph Cullmann. Committed on 14/07/2025 at 20:21. Pushed by cullmann into branch 'release/25.08'. Use KIO::moveAs to rename file This will error out if there is an existing dir with the same name (cherry picked from commit 2e9f41b871d333bcdb7b0ef98a35d214e87263f0) Co-authored-by: Waqar Ahmed <waqar.17a@gmail.com> M +1 -1 apps/lib/katefileactions.cpp https://invent.kde.org/utilities/kate/-/commit/5e5238d29e7e0880c45df7ea1078baaa57ca530b |