xdanieldzd / Scarlet

Game data conversion/export/import helper libraries - UNMAINTAINED
Other
97 stars 22 forks source link

System.ArgumentException - Illegal Characters in path #5

Open TedDawkin opened 7 years ago

TedDawkin commented 7 years ago

In ScarletWinTest MainForm

Method: public List GetFormatInfos(Type baseFormatType)

extension = Path.GetExtension(pattern).Replace("$", "");

Path.GetExtension(pattern) throws System.ArgumentException - - Illegal Character in path

if string pattern = (fnPatternAttrib as FilenamePatternAttribute).Pattern = ^.*.(btga|lga)$

because it it about the Pipe-Symbol "|"

Temporary fix for me of your course was to set string pattern = "^.*$";

xdanieldzd commented 7 years ago

The UI-based converter (i.e. ScarletWinTest) hasn't seen much work up to now and is rather hacky and incomplete. I even had a hunch that something like this might become an issue eventually, hence my comment file extension extraction from regex is iffy in the GetFormatInfos function's code.

I'll see about fixing this issue, as well as improving the GUI converter in general. In the meantime, please use the command line-based converter if you need to convert any files.