Windows long file names and MSX-DOS2 _FFIRST and _FFNEXT

Página 1/2
| 2

Por msd

Paragon (1455)

imagem de msd

18-04-2021, 14:19

I noticed a while ago that if I try to do xdir on my SD card (fat16) it always end with some error. like Invalid path name , or invalid attributes. I developed my own tool back in the day which more or less gives the same errors as xdir. No matter what I try in the code it doesn't seem to skip all the crap entries (suspected caused by long file names). the dos dir and cd commands seems unaffected by this issue. It seems it only effects directories. All tools that try to search through the directory trees give errors.

Anybody experience the same issues?

Entrar ou registrar-se para comentar

Por Jipe

Paragon (1461)

imagem de Jipe

18-04-2021, 16:00

do you know Long File Name Killer ?

https://www.vector.co.jp/soft/other/msx/se184251.html

Por msd

Paragon (1455)

imagem de msd

18-04-2021, 16:11

Jipe wrote:

do you know Long File Name Killer ?

https://www.vector.co.jp/soft/other/msx/se184251.html

Kind seem to find a working download there. But I'm also not sure if I should use this with fat16

Por msd

Paragon (1455)

imagem de msd

18-04-2021, 20:19

Found the link. this is inside the code
if (isfat16){
fputs("Error:FAT16 is not supported.",stderr);

Por gdx

Enlighted (4282)

imagem de gdx

19-04-2021, 02:44

Try MSX ROM Librarian. It's very useful for the ROM files.

https://www.msx.org/news/en/msx-rom-librarian-released

Por msd

Paragon (1455)

imagem de msd

19-04-2021, 11:58

Quote:

Try MSX ROM Librarian. It's very useful for the ROM files.

https://www.msx.org/news/en/msx-rom-librarian-released

How is this related?

Por sdsnatcher73

Paragon (1742)

imagem de sdsnatcher73

19-04-2021, 12:07

ROM Librarian can rename identified rom files to either long name or short name. Big smile Big smile

Por Grauw

Ascended (9763)

imagem de Grauw

19-04-2021, 12:50

msd wrote:

Found the link. this is inside the code

if (isfat16){
		fputs("Error:FAT16 is not supported.",stderr);

So I don’t think it is related to _FFIRST and _FFNEXT then? If the tool must do a FAT16 check I assume it bypasses the OS and accesses the sectors directly, interpreting the FAT12 data by itself. I don’t know why it would do a FAT16 check otherwise.

msd wrote:

No matter what I try in the code it doesn't seem to skip all the crap entries (suspected caused by long file names).

Long file name entries have the volume, system, hidden and read-only bits set (a normally not occurring combination), so they are only returned if these are explicitly requested.

Por sdsnatcher73

Paragon (1742)

imagem de sdsnatcher73

19-04-2021, 12:45

It is indirectly related in the way that it is a helpful tool for making sure you don’t have LFNs.

Por Grauw

Ascended (9763)

imagem de Grauw

19-04-2021, 12:52

I wasn’t replying to gdx or your comments. Added quotes now. Smile

Por msd

Paragon (1455)

imagem de msd

19-04-2021, 12:55

@grauw: After some more testing I'm starting to believe it has more to do with the fat16 implementation. I tried to copy some files from fat16 to ramdisk. It just stopped after 4 files. There where >100 files in the source directory.

Quote:

Long file name entries have the volume, system, hidden and read-only bits set (a normally not occurring combination), so they are only returned if these are explicitly requested.

In my own code I only ask for files and directories. _FNEXT returns FIBS with valid attributes but with an invalid file name.

Página 1/2
| 2