gphoto2 icon indicating copy to clipboard operation
gphoto2 copied to clipboard

Picture gets copied twice when using `--capture-image-and-download --keep` on Canon PowerShot S45

Open JanKalin opened this issue 3 years ago • 3 comments

Describe the bug

When taking a picture with --capture-image-and-download --keep, gphoto2 copies the picture twice, the second time asking for confirmation.

Name the camera

Model                          Port
----------------------------------------------------------
Canon PowerShot S45 (normal mode) usb:001,026

libgphoto2 and gphoto2 version Running on Octoprint Raspberry Pi 4

pi@octopi:~/scripts $ gphoto2 --version
gphoto2 2.5.20

Copyright (c) 2000-2018 Lutz Mueller and others

gphoto2 comes with NO WARRANTY, to the extent permitted by law. You may
redistribute copies of gphoto2 under the terms of the GNU General Public
License. For more information about these matters, see the files named COPYING.

This version of gphoto2 is using the following software versions and options:
gphoto2         2.5.20         gcc, popt(m), exif, cdk, aa, jpeg, readline
libgphoto2      2.5.22         all camlibs, gcc, ltdl, EXIF
libgphoto2_port 0.12.0         iolibs: disk ptpip serial usb1 usbdiskdirect usbscsi, gcc, ltdl, USB, serial without locking

To Reproduce --capture-image works fine:

pi@octopi:~/scripts $ sudo gphoto2 --capture-image
Detected a 'Canon:PowerShot S45 (normal mode)'.
New file is in location /DCIM/203CANON/IMG_0318.JPG on the camera

--capture-image-and-download segfaults (I've submitted this as a separate issue)

--capture-image-and-download --keep downloads the same picture twice:

pi@octopi:~/scripts $ sudo gphoto2 --capture-image-and-download --keep
Detected a 'Canon:PowerShot S45 (normal mode)'.
New file is in location /DCIM/203CANON/IMG_0322.JPG on the camera
Saving file as IMG_0322.JPG
Keeping file /DCIM/203CANON/IMG_0322.JPG on the camera
New file is in location /DCIM/203CANON/IMG_0322.JPG on the camera
File IMG_0322.JPG exists. Overwrite? [y|n] n
Specify new filename? [y|n] y
Enter new filename: SECOND.JPG
Saving file as SECOND.JPG
Keeping file /DCIM/203CANON/IMG_0322.JPG on the camera
pi@octopi:~/scripts $ diff IMG_0322.JPG SECOND.JPG
pi@octopi:~/scripts $

ADDED: Downloading the picture by itself works just fine:

pi@vpnpi:~ $ sudo gphoto2 -f /DCIM/203CANON -p IMG_0341.JPG
Detected a 'Canon:PowerShot S45 (normal mode)'.
Saving file as IMG_0341.JPG

JanKalin avatar Sep 29 '20 20:09 JanKalin