pixeltris / YgoMaster

Offline Yu-Gi-Oh! Master Duel
MIT License
885 stars 126 forks source link

Easy way to fix LocalData related file loading error #402

Closed pine-apple-pie closed 5 months ago

pine-apple-pie commented 5 months ago

I discovered a much easier way of resolving this issue than the one posted in readme which I could not fully understand. https://github.com/pixeltris/YgoMaster/blob/master/Docs/FileLoadError.md

Start up a command prompt in admin mode and type: mklink /d "Path to MD folder\LocalData\0000000" "Path to MD folder\LocalData\random letters" This sets up a symbolic link between your actual MD cache folder and the folder \00000000\ (which YgoMaster uses).

https://github.com/pixeltris/YgoMaster/issues/401

pixeltris commented 5 months ago

There is code which handles the folder lookup:

https://github.com/pixeltris/YgoMaster/blob/91d3e5f9d58c63bb8c47ef33f1da3a81951139d9/YgoMasterClient/Program.cs#L858-L911

People usually either have outdated folders or multiple folders inside of LocalData which is where problems arise from.

There is also an issue with LocalSave where by the client seemingly expects some data which results in the error if not correct. That's the reason for the LocalSave copying instructions. I haven't looked deeply into the exact causes of this one and it could be the symlink fixes those but this should be something that should be fixed where the issue occurs in the code.