nus-cs2113-AY2122S2 / pe-dev-response

0 stars 0 forks source link

Save data is wiped even with small corruption #1023

Open nus-pe-bot opened 2 years ago

nus-pe-bot commented 2 years ago

I only changed the cashback of one of the CC to negative which does seem to be rejected. However, the reaction from the programme is excessive. My entire save data is wipied even the other components which were left untouched. You can instead make the programme transfer the corrupted data to another file so that at least the user can have a look at it next time instead of wiping it clean. If i have a huge save data but corrupted with just one character then gone case already.

SS8.jpg

NegCBChange.jpg


[original: nus-cs2113-AY2122S2/pe-interim#877] [original labels: type.FeatureFlaw severity.Medium]

SeanHoWB commented 2 years ago

Team's Response

Thank you for pointing this out. As a user it may seem excessive, but in view of the program we would not want any corrupted and potentially malicious data in data.txt to corrupt the program. A safety measure is also implemented for the users where the program will notify users that the save file is corrupted and to copy over the file to prevent deletion.

Here is the error message promtping users to save the file image.png

Duplicate status (if any):

--