sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #35395
[Bug 1511078] Re: Automatic image file names can accidentally overwrite existing images
** Changed in: sikuli
Status: New => Won't Fix
** Changed in: sikuli
Assignee: (unassigned) => RaiMan (raimund-hocke)
** Changed in: sikuli
Milestone: None => 1.1.0
** Summary changed:
- Automatic image file names can accidentally overwrite existing images
+ [1.1.0] variable = <automatic image file name> overwrites existing images --- is by intention
--
You received this bug notification because you are a member of Sikuli
Drivers, which is subscribed to Sikuli.
https://bugs.launchpad.net/bugs/1511078
Title:
[1.1.0] variable = <automatic image file name> overwrites existing
images --- is by intention
Status in Sikuli:
Won't Fix
Bug description:
So in SikuliX 1.1, there seems to be a neat new feature which
automatically sets the name of a new image capture to be same as
variable name if you capture the image while the cursor is after the
equals sign (ie, when the cursor is on the right side of "Menu = ",
the image I capture will automatically be named to Menu.png).
However, this potentially has the unintended consequence overwriting
any existing image in the bundle that already has the same name. I've
encountered this myself when I tried to set a switch of using
different images depending on the platform tied to the same variable
name. Say I intended to do something like:
if not "10.11" in Settings.getOSVersion():
Menu = Menu.png
else:
Menu = Menu1011.png
When I try to do the capture for the second Menu statement, it ends up
overwriting the image in the first Menu statement because of the
automatic rename.
I think what's needed here is a check to make sure the image doesn't
already exist in the bundle before setting the name for the new image,
and using naming convention like a Menu(1).png, Menu(2).png, etc, if
there are existing ones. Or alternatively, make it an explicit option
in the Screen Capturing preferences panel so someone can disable it if
it does give them problems.
To manage notifications about this bug go to:
https://bugs.launchpad.net/sikuli/+bug/1511078/+subscriptions
References