Page 1 of 1

Programmers beware!

Posted: Fri Sep 02, 2016 5:24 pm
by rbytes
Now that a few months have passed, I thought I should mention again a deadly hidden fact about about the DELETE command that I discovered too late!

It is possible with a single command to delete your entire Smart Basic root folder! Should this be possible? NO, and I will again ask Mr. K. under Suggestions for Improvement to provide some protection. One method would be a prompt that would ask "Do you really want to delete everything? YES NO". Another would be to intercept and ignore that specific command.

You might ask, why would anyone ever give the command DELETE "/"? The answer - they would not do it intentionally. Mistakes occur during coding. That is why bug reports exist. You would likely be intending to issue a command such as DELETE "/"&fil$,
But think about what would happen if for some reason your code resulted in fil$="". The answer - in a split second you would lose everything in your Smart Basic folder!

Fortunately when it happened to me, I had kept backups. But it took hours to copy and restore everything. I hope I can spare other users from this outcome. 8-)

Re: Programmers beware!

Posted: Fri Sep 02, 2016 5:30 pm
by Mr. Kibernetik
ricardobytes wrote:I will again ask Mr. K. under Suggestions for Improvement to provide some protection.
One request is enough.
Yes, backing up to Dropbox is an important safety measure.