That definitely shouldn't happen. Sounds like a bug. We try not to destroy files that Proton didn't create.
huh. I thought that switching from one Proton version to another on an installed game could cause this. However, I now also tried a few other games and I didn't observe that behavior on any of them. Closing this 'cause whatever caused this wasn't Proton. Probably the game itself did something weird.
This issue should not be closed. My prefix got deleted today
Anyway yes, this shouldn't happen , I lost several save files, very disappointing.
I have opened a newer issue here https://github.com/ValveSoftware/Proton/issues/4774
Feature Request
I confirm:
contain this feature already.
Description
When Steam/Proton is about to delete or modify the compatdata folder of a game it should display a warning or confirmation message to give the user some time to save data that a game or application might store in the prefix.
Use case: When I switched from Proton 5.13 to 6.3 today and started Beatsaber the files in steamapps/compatdata/620980/pfx/drive_c/users/steamuser/AppData/LocalLow/Hyperbolic Magnetism/Beat Saber were deleted. This is where it stores the configuration, the amount of times a level was played, campaign process... while this is a minor annoyance in Beatsaber, losing these files would be very annoying for story based games that store save files inside the prefix.
Justification
I've never seen Wine delete the files of a game inside a prefix.