Re: [hatari-devel] hatari-ui icon

[ Thread Index | Date Index | More Archives ]

Le 14/11/2014 20:56, Thomas Huth a écrit :

Hatari MUST be
able to determine if a file is acceptable by inspecting the file
data before using it.

At least the MSA code checks for the right header magic value. Not
sure for STX, maybe Nicolas can answer that question. Concerning .ST
disk images, there is no header that can be checked, so the file
extension is the only thing you can rely on here.

All STX files start with the 4 bytes header "RSY\0"

For ST files, it's quite complicated to determine if it's a valid image, we can have a look at the boot sector and check if size match the expected number of tracks/sectors/sides, but this is not error proof.

At least, I don't think Hatari can do more checks when using mime types that what we already do when using --disk-a option or using the UI to open a file.

Mail converted by MHonArc 2.6.19+