itchio / itch.io

:bug: Public itch.io issues tracker and documentation - use support instead for private information!
https://itch.io/support
241 stars 27 forks source link

Replacing a file happens without saving changes. :( #1566

Open TangentFoxy opened 8 months ago

TangentFoxy commented 8 months ago

Describe the bug I was updating an embedded webpage project that was created in 2015, and to test without breaking things if my new version failed, I decided to temporarily uncheck "This file will be played in the browser" and then hide the old version. Then I uploaded the new version, which happened to have the same filename, and this visually replaced the old version I had just hidden. I decided to refresh the page without saving changes in order to undo this error, but the old version was permanently deleted as far as I can tell, and replaced with the new version.

While I believe I saw that this is intended behavior in general (I think I saw a warning about this in documentation somewhere), it's been long enough (years) since I looked that I forgot and did not expect this behavior. Additionally, I think it's unfair that refreshing the page without having saved changes still did this and that there was no warning during the upload process to confirm I wanted the old file replaced.

Expected behavior At least warn us before accepting a file that will cause a replacement? I would prefer if uploading a file didn't immediately apply without saving changes, because every other option on the edit page doesn't apply until you click Save, but I understand if that's infeasible. (I would prefer not replacing the file at all, but I understand this is expected behavior for the majority and would probably destroy workflows if changed.)