RPCS3 / rpcs3

PS3 emulator/debugger
https://rpcs3.net/
GNU General Public License v2.0
14.75k stars 1.87k forks source link

Installing a PKG file that has ODC files that overwrite/replace existing ODC files causes RPCS3 to delete a bunch of files it shouldn't. #13113

Closed Splicewave closed 1 year ago

Splicewave commented 1 year ago

Allow me to set the scene so you understand everything. I work on a developer build of a dead PS3 game called PlayStation Home. this developer build is a dev game and its serial is NPIA00010. PS Home (retail) is NPIA00005 but retail is not important, just so you know the difference. So this developer build I am trying to put as much of the original content from NPIA00005 onto NPIA00010 and one of its file types is ODC and all ODC files are called OBJECT.ODC but are in different folders so they don't overlap. And lets say I make an artificial content update for people who don't know how to make things work inside the game (its not the aim of the game, this is strictly a dev thing what im doing. Its a social world game fyi) And inside this update that is a PKG file, I include an ODC file that already exists in the main build of the game that this update obviously goes into, it will cause RPCS3 to say it failed to install the PKG file, come up with all the ODC files it fails to install including their file path. Turns out that its fine to install new OBJECT.ODC files but overwriting/replacing OBJECT.ODC files is a problem for RPCS3. and no other file type has this issue. it can replace/overwrite xml files and install new ones with no problem inside the same PKG but it drops the ball with ODC files for some reason. And it doesn't just fail to replace those ODC files, it goes into the NPIA00010 folder, deletes ALL of the files including the PARAM.SFO, ICON0.PNG and the DRMDIR and everything else. The only folder it doesn't delete is the USRDIR folder and because it deletes the PARAM.SFO, it causes the game to disappear from RPCS3 games list. Fortunately for the time being I have made a temporary fix so if and when this happens for anyone, they can install this 6mb PKG i made in order to get back the PARAM.SFO and that which was deleted but having to do this is a problem and I hope you can fix it. Cheers. If you need any further info on this subject, im happy to help. Reach out to me on discord: Splicewave#0021

Megamouse commented 1 year ago

Î think it deletes the files because it always does so when an installation fails. I could be wrong though.

elad335 commented 1 year ago

There could also be some other problem with your ODC files such as being used by another program in the background, I fixed the removal bug in #13114 . At least upload the PKG so we have more information.

elad335 commented 1 year ago

Also added another experimental fix.

Megamouse commented 1 year ago

Missing log with the failure

Splicewave commented 1 year ago

I have done some light testing. Looks like this has worked. Thankyou!

Splicewave commented 1 year ago

I would have provided the PKG however it would need the full build to install it onto. The PKG is 4GB, the base game is 26GB that it goes into.