← Back to team overview

sikuli-driver team mailing list archive

[Bug 1324324] Re: [1.1.0-Beta1] Commenting out a line deletes images mentioned in the comment only --- workaround: switch off option in preferences (delete not used images)

 

** Changed in: sikuli
       Status: Confirmed => Fix Committed

** Changed in: sikuli
   Importance: High => Critical

-- 
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1324324

Title:
  [1.1.0-Beta1] Commenting out a line deletes images mentioned in the
  comment only --- workaround: switch off option in preferences (delete
  not used images)

Status in Sikuli:
  Fix Committed

Bug description:
  **** workaround --------------------------------
  if you want to use the approach to comment out lines containing image names for images you want to keep in your script folder:
  - preferences -> more options
  - switch off the option <delete not used 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 :)

To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1324324/+subscriptions


References