Re: [hatari-devel] File conflict when coping filename with "+" in name and using gemdos emulation

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Hi,

On 20.9.2025 23.41, Thomas Huth wrote:
Am Sun, 14 Sep 2025 18:29:38 +0200
schrieb Thorsten Otto <admin@xxxxxxxxxxx>:
In the picture below, when copying the file tvi912b+ from folder a to folder
b, i get i file conflict error (emutos thinks the file already exists). I
don't get such an error when copying tvi912b- from folder b to folder a.

I already did a quick look at the hatari source, but could not find any reason
which may cause this. Any idea?

I think this is due to INVALID_CHAR being set to '+' ... No clue why that's
the case, though ... Eero, looks like this has been introduced by you many
years ago, do you still remember the rationale here?

It's stated in the 2014 commit:
https://framagit.org/hatari/hatari/-/commit/f00ccf44888c058f2fa617ec53594809e35b8f2a

INVALID_CHAR is a valid GEMDOS filename character used to replace invalid host file name characters.

As stated in the commit, selected replacement char should not cause issues e.g. for:
- TOS *.INF files, when given file is autostarted
- GEM file selectors (TOS or replacement ones)
- path/file handling code of common programming languages

regardless of what part of user's host filename contains invalid chars for GEMDOS file names.

Earlier that char was '@', but because e.g. autostart line in INF file ends to '@' char (+ space and CR+LF), it had to be changed.

Because it has to be GEMDOS-legal char, there's always a possibility of overlap with legal and illegal Atari names after replacement, so character needs to be something that's used seldom in real Atari file names, and currently it's '+'.


	- Eero

[1] According to Compedium, following are legal GEMDOS filename chars:
A-Z, a-z, 0-9
! @ # $ % ^ & ( )
+ - = ~ ` ; ' " ,
< > | [ ] ( ) _




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/