pixeltris / YgoMaster

Offline Yu-Gi-Oh! Master Duel
MIT License
770 stars 112 forks source link

Easy way to fix LocalData related file loading error #402

Closed pine-apple-pie closed 1 month ago

pine-apple-pie commented 1 month 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 1 month 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.