Comment 0 for bug 1324324

Revision history for this message
greg hogan (greg-hogan) wrote : Commenting out a line deletes images

When one comments out a line that contains an image, the image is deleted without warning from the folder, even when the image file attributes are set to READ-ONLY.

Uncomment the line and even though the image is still shown in the IDE it has been deleted from the folder it was saved in, thus crashing the script with a message about null references etc..

This also happens when images or Art Assets are supplied by a 3rd Party, comment out a line that uses an Asset and its gone .. permanently, no warnings, no possible recovery from the Recycle Bin, no way to stop it happening again. One must re-do all the commented out code and re-capture images from scratch (or retrieve from the client again) .

This is not good as one can lose a significant amount of work by just a comment - epic failure !
To add insult to injury, the images do not return when ctrl-z'd back, making the undo feature 100% ineffective in this regard.

This is a very bad Design Smell as Sikuli assumes responsibility and control of maintaining the folder and images, subverts and ignore the file attributes by prematurely culling what it wrongly deems as surplus images.
This might have a good idea IF the deleted images were sent to the Recycle Bin rather than being nuked from orbit with no survivors.

Possible solutions :
1) Avoid comments - not very practical, aint gonna happen.
2) Stop Sikuli from deleting files without permission or warning.
3) Respect file attributes like the rest of the world does.

Cheers :)