Batch import of ROMs can't parse URIs if the search starts too high in the hierarchy resulting in long paths

Issue #5306 new
Ars Ex Machina created an issue

LaunchBox Version: 10.15-beta-9 and older
Windows Version: 10 Pro x64, 1903

Description of issue:

Using “tools>imports>rom files”
If you have a long path, e.g.:

d:\emulation\roms\japanese manufacturer\japanese console\games (u)[!]\SomeNiceGame - Subtitle of game (1970) (Developer) (u) [!]\media\SomeNiceGame - Subtitle of game (1970) (Developer) (u) [!].chd

Importing ROMs, pointing to d:\emulation\roms\japanese manufacturer\japanese console\fails all together because no games are detected. The reason seems to be too long URIs:

FIRST CHANCE EXCEPTION: The specified path, file name, or both are too long. The fully qualified file name must be less than 260 characters, and the directory name must be less than 248 characters.
at System.IO.Path.LegacyNormalizePath(String path, Boolean fullCheck, Int32 maxPathLength, Boolean expandShortPaths)

However, if one does point importing to e.g.:
d:\emulation\roms\japanese manufacturer\japanese console\games (u)[!]\SomeNiceGame - Subtitle of game (1970) (Developer) (u) [!]\

The importer properly detects “SomeNiceGame” for platform “japanese console”.
It’ll be imported properly and it can be launched perfectly fine.

Suspicion:
This suggests while Launchbox can handle the long paths and Retroarch can too, the ROM importer doesn’t seem to be able to, ultimately breaking batch-importing ROMs.
As there’s also no way to copy/paste a file or directory list into the importer (one could easily pipe from the console into a .txt) one would have to add hundreds or thousands of paths and or files manually or write a script that completely changes the directory structure of a (or many) existing ROM collections.

The issue is reliably reproducible.

Comments (0)

  1. Log in to comment