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.
Programmers beware!
- rbytes
- Posts: 1338
- Joined: Sun May 31, 2015 12:11 am
- My devices: iPhone 11 Pro Max
iPad Pro 11
MacBook
Dell Inspiron laptop
CHUWI Plus 10 convertible Windows/Android tablet - Location: Calgary, Canada
- Flag:
- Contact:
Programmers beware!
The only thing that gets me down is gravity...
- Mr. Kibernetik
- Site Admin
- Posts: 4786
- Joined: Mon Nov 19, 2012 10:16 pm
- My devices: iPhone, iPad, MacBook
- Location: Russia
- Flag:
Re: Programmers beware!
One request is enough.ricardobytes wrote:I will again ask Mr. K. under Suggestions for Improvement to provide some protection.
Yes, backing up to Dropbox is an important safety measure.