https://bugs.kde.org/show_bug.cgi?id=506802
Bug ID: 506802
Summary: Rename function leads to data loss when target name is
an existing directory
Classification: Applications
Product: kate
Version First 25.04.2
Reported In:
Platform: Other
OS: Linux
Status: REPORTED
Severity: normal
Priority: NOR
Component: general
Assignee: [email protected]
Reporter: [email protected]
Target Milestone: ---
SUMMARY
Using the Rename function to rename a file to such a name that happens to be an
existing directory leads to loss of file contents.
STEPS TO REPRODUCE
1) In some directory, make a text file with any content and a subdirectory
2) Open the text file in Kate or Kwrite
3) Use File -> File actions -> Rename, enter the name of the existing
subdirectory
OBSERVED RESULT
The editor tab is reopened with the new path, but the buffer is empty and an
error is shown:
"The file <...> could not be loaded, as it was not possible to read from it.
Check if you have read access to this file."
The original file is gone, contents of the file are lost. Undo is not
available.
EXPECTED RESULT
Show an error, keep the original file. The error message could explain the
problem better.
SOFTWARE/OS VERSIONS
Application: Kate / KWrite 25.04.2
OS: Debian testing (trixie)
Filesystem: ext4
KDE Plasma Version: 6.3.5
KDE Frameworks Version: 6.13.0
Qt Version: 6.8.2
--
You are receiving this mail because:
You are watching all bug changes.