RomVault / RVWorld

RomVault World
http://www.romvault.com
Apache License 2.0
87 stars 20 forks source link

Crashes when rom name is too long #12

Open ghost opened 4 years ago

ghost commented 4 years ago

With the latest TOSEC several rom names are quite long. For example

RomVault/DATRoot/TOSEC/Apple$ grep "rom name" * | sed 's/[^"]*"//' | sed 's/".*//' | grep '.\{200\}'
...
Blisterball! (1981)(Creative Computing)[cr Bengal Tiger] & Tsunami (1981)(Creative Computing) & Bouncing Kamungas (1983)(Penguin Software)[cr Dr. Micro - Freeze] & Mad Bomber (1981)(Creative Computing).do
Blitzkrieg (1979)(Programma Software) & Sabotage (1981)(On-Line Systems)[48K] & Horizon V (1981)(Gebelli Software) & Red Alert (1981)(Brøderbund)(II-II+)(US)[48K] & Robotron 2084 (1983)(Atarisoft)[48K].do
Dueling Digits (1982)(Brøderbund)[cr Super Pirates of Minneapolis] & Firebug (1982)(MUSE Software)(II+)[cr][48K] & Ski Slalom Competition (1981)(Stanton, Jeffrey) & Track Attack (1982)(Brøderbund)[cr The Duplicators].do
Falcons (1981)(Piccadilly Software)[cr Applesoft Attacker][48K] & Pest Patrol (1982)(Sierra On-Line)(II-II+)[cr Mr. Krac-Man][48K] & Alien Typhoon (1981)(Starcraft) & Spy's Demise (1982)(Penguin Software)[48K].do
Hi-Res Football (1980)(On-Line Systems)[b] & Computer Foosball (1981)(Sirius Software)[cr Mr. Xerox] & Hi-Res Soccer (1981)(On-Line Systems)[b] & Baseball (1979)(Programma International).do
Lasar Wars (1981)(Crystal Computer)(US) & Lazer-Blaster (1981-07-06)(MicroSPARC) & Flockland Island Crisis, The (1982)(Vital Information)(II+)[cr Mr. Krac-Man][48K] & Telengard (1982)(Avalon Hill).do
Mapple (1983)(Psychedelic Software)[cr Rad & Pyro][h file Crockett] & Spectre (1982)(Datamost)[cr] & Pandora's Box (1982)(Datamost)[cr The Untouchables][48K] & Pooyan (1984)(Datasoft)[cr The Syndicate - Black Bart][48K][inc. cheat].do

Some of these long names cause RomVault to crash when fixing files. For example Mapple causes this

An Application Error has occurred.

EXCEPTION:
Message:The filename, directory name, or volume label syntax is incorrect.

STACK TRACE:
   at System.Environment.GetStackTrace(Exception e, Boolean needFileInfo)
   at System.Environment.get_StackTrace()
   at RVCore.ReportError.UnhandledExceptionHandler(String e1)
   at RVCore.FixFile.Fix.FixBase(RvFile child, Boolean thisSelected, List`1 fileProcessQueue, Int32& totalFixed, Int32& reportedFixed, Stopwatch cacheSaveTimer)
   at RVCore.FixFile.Fix.FixDir(RvFile dir, Boolean lastSelected, List`1 fileProcessQueue, Int32& totalFixed, Int32& 

As a workaround I've been manually editing the DAT and making the filenames shorter. It's a bit of trial and error to find them all. Would be better if the software handled longer names more gracefully.

I'm using samba for storage. That might be a contributing factor.