Closed vexorian closed 10 years ago
Actually, I thought the override = false
is enough for the user to use.
But there may be situations where the user click regenerate code
or switch problem-desc template for example.
A better way is to have a enumeration-like type for the override option, instead of just a boolean.
Does override = true stop backups from appearing?
No. When override = true, it will be backed up and then overwritten. override = false means no overwritten and no backup, as long as the file exists.
Plan to add enumeration support for the parser and change the override option to a 3-value enum type (force, backup, skip)
force = always override, no backup backup = always override with backup skip = don't override automatically, if regenerate code button is used, use backup.
Right?
Exactly!
I will update the wiki later.
It is ironic that it was precisely in yesterday's match that I learned a good use case for keeping backup of problem statement. It allows you to have a record of old version of problem statement in case the admins change it.
Although, as long as you don't close your browser window, it works too.
Really... I didn't participate yesterday's SRM, but I believe that rarely happens :-)
Source code and samples are usually modified by user, so if new file is generated it is worth keeping a backup.
But HTML is unlikely to be modified by user. Maybe have a template option to disable backups?
The issue with this would be that it would be best if it was considered "true" by default.