Page MenuHome GnuPG

gpg "showphoto" not creating temp file on Windows 10
Closed, ResolvedPublic

Description

Windows 10 PRO / 64 bit -- version 1809
32.0 GB RAM

gpg (GnuPG) 2.2.11
libgcrypt 1.8.4

On the command line, I use gpg --edit-key KEY_ID to open a key. I then use UID # to highlight the photo and then enter "showphoto". This brings up a Windows 10 dialog box asking me to choose the program I want to use to view the image. It makes no difference which program I choose, the result is always the same. I receive an error message the shows that "C:\Users\Gerard\AppData\Local\Temp\gpg-62cno9\87DEC564.jpg" does not exist. I have double checked that directory, and the file does not exist. GPG is most likely not creating the temporary file or is placing it in the wrong location. I have tried this with different keys and the results remain the same.

Details

Version
gpg(GnuPG) 2.2.11

Event Timeline

werner triaged this task as Normal priority.Jan 23 2019, 1:16 PM
werner added projects: gnupg (gpg22), Windows.

Actually the temp file is created but because the photo viewer is run as a detached process and gpg keeps on running, the temp file has been removed by gpg at the time the photo viewer tries to open it. Ooops. The correct behaviour would be to wait for the photo viewer to be finished. We use

cmd /c start /w TEMPFILE.jpg

so that start looks up the program to display the photo. This used to work on older Windows versions . The new photo viewer on Windows (I tested with 8.1 and current 10) seems to return immediately and thus start can't wait for it. We need to find a way to find a photo viewer which will actually wait.

Workaround is

--photo-viewer "cmd /c start /w %I"

(uppercase %i ) but that does not remove the jpeg file.

There will be no full solution for this. However, the next release should in general work due to a 400ms delay we use after spawning the viewer. This is configurable; see rG7e5847da0f3d715cb59d05adcd9107b460b6411b.