Bug 446019 - New text file created with 2 chars
Summary: New text file created with 2 chars
Status: RESOLVED DUPLICATE of bug 297003
Alias: None
Product: dolphin
Classification: Applications
Component: general (show other bugs)
Version: 21.08.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Dolphin Bug Assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-11-24 08:48 UTC by 0BADC0DE
Modified: 2022-06-13 22:50 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description 0BADC0DE 2021-11-24 08:48:48 UTC
SUMMARY
***
When creating a new TEXT file two characters are appended: a blank (0x20) and a carriage return (0x0A).
It should be empty.
***


STEPS TO REPRODUCE
1. Start dolphin
2. From context menu select "Create new" --> "Text file"
3. Confirm a file name (default is "Text File.txt")

OBSERVED RESULT
The new file is shown in the window to be 2 bytes long.
$ od -t x1 -c Text\ File.txt 
0000000  20  0a
             \n
0000002

EXPECTED RESULT
The new file should be 0 (zero) bytes long as the user hasn't requested any content.

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.23.3-1
(available in About System)
KDE Plasma Version: 5.23.3-1
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 0BADC0DE 2022-05-25 14:20:20 UTC
Confirmed still with:

Plasma Version : 5.24.5-2
KDE Version : 22.04.1-1
Frameworks Version : 5.94.0-1
Qt5 Version : 5.15.4+kde+r1-1
kate version: 22.04.1
Comment 2 P. Förster 2022-05-27 16:09:47 UTC
I can also reproduce this.

Operating System: KDE neon 5.24
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4

Dolphin Version: 22.04.1
KWrite Version: 22.04.1
Comment 3 Bug Janitor Service 2022-06-13 22:30:54 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kio/-/merge_requests/866
Comment 4 Alain Laporte 2022-06-13 22:32:42 UTC
Issue is probably in KIO. I have proposed a merge request to fix that => https://invent.kde.org/frameworks/kio/-/merge_requests/866. But I'm not sure if it's really good (see comment in the merge request).
Comment 5 Ahmad Samir 2022-06-13 22:50:18 UTC

*** This bug has been marked as a duplicate of bug 297003 ***