revDeleteFolder and Lessons Learned..
Chipp Walters
chipp at chipp.com
Fri Jul 8 06:03:11 EDT 2005
Hi Dave,
Well, since I passed revDeleteFolder a single "/" and it tried to delete
(w/out being able to be interrupted) the *entire* hard disk, I would say
it's less dangerous to 'roll your own'. I would expect revDeleteFolder
to take as an argument a valid path, including drive letter. For
instance I would expect:
revDeleteFolder "C:/"
to delete the C drive. I don't know why just "/" does it and I'm afraid
to test it with a null, especially since it can't be interrupted.
Anything you roll on your own can be interrupted with a control-period.
The non-interruptibility of the command is a huge issue, IMO, and one
I'm not willing to take any more chances on. I haven't looked at the
code, but as Xavier mentioned, it seems like it should be an engine
level issue, not a shell call. You are certainly welcome to use it to
your hearts content-- I won't be. Once burned, twice shy.
best,
Chipp
Dave Cragg wrote:
> But I'm not entirely clear of the lesson to be learned. Is the problem
> really with revDeleteFolder, or with the nature of script locals?
>
> If we don't use revDeleteFolder, but we want to delete a folder, then
> we have to roll our own routines. This can be plenty dangerous too.
> So do we warn people not to use revDeleteFolder, and leave them to
> their own potentially dangerous devices. Or simply warn people to be
> *extremely* careful when deleting folders and check they are in fact
> deleting the intended folder.
More information about the use-livecode
mailing list