Re: [hatari-devel] Regression in Hatari 2.6.1 - Disabling GEMDOS drive fails

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


Le 31/08/2025 à 10:36, Christian Zietz a écrit :
Hello,

sadly, I have to report a regression in Hatari 2.6.1. The manual states about the -d / --harddrive option: "If <dir> is an empty string, then harddrive's emulation is disabled". This worked well until and including Hatari 2.6.0. In Hatari 2.6.1, however:

hatari-2.6.1_windows64\hatari.exe -d ""

Hatari v2.6.1 - the Atari ST, STE, TT and Falcon emulator.

Hatari is free software licensed under the GNU General Public License.

Usage:
  hatari [options] [disk image name]

Try option "-h" or "--help" to display more information.

Error while parsing argument "" for option "--harddrive":
   Given directory doesn't exist or permissions prevent access to it!

Option usage:
   --harddrive <dir> Emulate harddrive partition(s) with <dir> contents
     or -d <dir>
<press Enter to exit>


This happens on Windows and on Linux. I'm afraid I don't have time to investigate. However, this is a major regression (imho) that needs to be looked into.


Hi

I confirm, this is the problem :

src/options.c line 1704 :

                case OPT_HARDDRIVE:
                        i += 1;
ok = Opt_StrCpy(OPT_HARDDRIVE, CHECK_DIR, ConfigureParams.HardDisk.szHardDiskDirectories[0],
			[...]

flag "CHECK_DIR" will return an error if dir doesn't exist, which is the case with "-d ''"

A possible fix would be to 1st test if the dir is empty "" ; if so, set gemdos HD to false and if not call Opt_StrCpy as above as in this case we really want to ensure the dir exist.

This is a recent change from Eero, I'd rather let him do the fix the way he prefers (maybe this empty dir issue can appear in other options, I didn't check that)

Nicolas







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