NTFS Win32 drives are not detected as such, allowing invalid filename characters
Version information
Manjaro XFCE latest Thunar 4.20.5
Steps to reproduce
- mount a ntfs partition with Thunar and with Thunar do the followings,
- create a new file on this partition, call it
invalid 2025-11-02 08:00.txt - rename this very file as
invalid 2025-11-02 08:00 CET+1.txt - make a copy of this file
Current behavior
Under Linux, it's possible to introduce invalid chars on a ntfs or exFat partition. These chars will raise problem when connected to Windows.
According to Microsoft's spec there are 9 illegal printable characters in exFAT or ntfs filenames,
"*/:<>?\|,
along with all 32 nonprinting control codes like you'd probably expect.
To check for invalid chars
find . -print0 | while IFS= read -r -d '' path; do name=$(basename "$path"); if [[ "$name" =~ [\<\>\:\"\\\|\?\*] ]]; then echo "$path"; fi; done
Expected outcome
- in a copy, as does Dolphin 25.8.1, it must raise an error that chars some chars are invalid and propose to default replace them by an underscore. See screenshot.
Note that the source of the copy might be in ext4, but the output might be exFat (common format for usb stick).
Different partitions's format, different rules and applies to file name or path
- in rename or create, it must raise an error that some chars are invalid and propose to default replace them by an underscore. This is crutial, as under Windows, you'll bump into problem to rename or delete an invalid file or folder's name. Here Dolphin has no popup window.
Additional information
the problem goes beyond Thunar, as many apps fail to comply with the partition invalid chars.
Even in command line, for instance,
touch "invalid!!!.txt"
or
mkdir "invalid?"
do not raise any error on a ntfs partition
Thanks
