GPSaveConverter icon indicating copy to clipboard operation
GPSaveConverter copied to clipboard

Escape character inserted while creating Xbox save file

Open nypoCJ opened this issue 1 year ago • 2 comments

Hi,

Here is a description of the bug which I believe is called an "Escape character" :

Context: When converting a non-Xbox save file to an Xbox save file, an issue arises where files containing a . or / result in an additional / being inserted.

Example: A non-Xbox file named peru_123abc.dat, when added to the Xbox container, is transformed into peru_123abc/.dat

Note: This behavior occurs with the default regex rule. It also happens when attempting to modify the regex to remove.dat from the non-Xbox file and then re-add .dat to the Xbox Blob ID using a pattern like ${FileName}.dat.

Thanks for your help

nypoCJ avatar Dec 13 '24 17:12 nypoCJ

It might be this line doing it, will have to investigate more https://github.com/Fr33dan/GPSaveConverter/blob/61d2380a69f0105737bb2db7aa917de19a11386c/GPSaveConverter/Library/GameInfo.cs#L305

FlaminSarge avatar Dec 15 '24 05:12 FlaminSarge

It might be this line doing it, will have to investigate more

I think you are right. We need to escape the regex for the Where condition, but then use the unescaped value for AddFile

Fr33dan avatar Mar 04 '25 05:03 Fr33dan