Bug 468282

Summary: Provide a specific error message when a file cannot be written because it contains invalid characters for that filesystem
Product: [Frameworks and Libraries] frameworks-kio Reporter: postix <postix>
Component: generalAssignee: KIO Bugs <kio-bugs-null>
Status: REPORTED ---    
Severity: wishlist CC: john.kizer, kdelibs-bugs-null, samontab
Priority: NOR    
Version First Reported In: 5.104.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description postix 2023-04-08 12:55:09 UTC
SUMMARY


STEPS TO REPRODUCE
1.  Create a file called "A\nB" on e.g. a BTRFS drive
2.  Copy it in Dolphin (ctrl+c) and paste it onto an NTFS drive (ctrl+v)

OBSERVED RESULT
Dolphin shows an dialog saying that the file could not be written.
Journalctl logs
```
dolphin[4647]: kf.kio.workers.file: copy() QUrl("file:///home/user/A%5CnB") to QUrl("file:///media/data/A%5CnB") mode= 420
```
However, there's no further indication of what's wrong and why it cannot be copied.

EXPECTED RESULT
A specific error message, saying that the file contains an illegal character for NTFS, namely "\n".

SOFTWARE/OS VERSIONS
Operating System: openSUSE Tumbleweed 20230407
KDE Plasma Version: 5.27.4
KDE Frameworks Version: 5.104.0
Qt Version: 5.15.8
Kernel Version: 6.2.9-1-default (64-bit)
Graphics Platform: Wayland
Comment 1 postix 2023-04-08 12:58:22 UTC
You can also do the following:

1) Create a file on an NTFS drive called "Test.txt".
2) Rename it in Dolphin to "Test\n.txt"

Dolphin will complain that the file cannot be renamed without saying why. However, it will show the file as it were renamed. If you hit F5 to refresh, the original filename is shown again.
Comment 2 John Kizer 2025-06-15 05:48:45 UTC
*** Bug 504259 has been marked as a duplicate of this bug. ***
Comment 3 John Kizer 2025-06-15 05:50:46 UTC
Just some context, for what it's worth, on other related issues in other projects: https://github.com/syncthing/syncthing/issues/9395