xdg-open spawns the user's preferred image viewer and then exits.
Therefore we must not remove the temp file when it exits,
otherwise by the time the actual image viewer is started the file
doesn't exist any more.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
---
g10/photoid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/g10/photoid.c b/g10/photoid.c
index 592d5e484..e6f0a41a6 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -287,7 +287,8 @@ get_default_photo_command(void)
else if (!path_access ("display",X_OK))
return "display -title 'KeyID 0x%k' %i";
else if (getuid () && !path_access ("xdg-open", X_OK))
- return "xdg-open %i";
+ /* xdg-open spawns the actual program and exits so we need to keep the temp file */
+ return "xdg-open %I";
else
return "/bin/true";
#endif
--
2.30.1
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Therefore we must not remove the temp file when it exits,
otherwise by the time the actual image viewer is started the file
doesn't exist any more.
Signed-off-by: Nicolas Fella <nicolas.fella@gmx.de>
---
g10/photoid.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/g10/photoid.c b/g10/photoid.c
index 592d5e484..e6f0a41a6 100644
--- a/g10/photoid.c
+++ b/g10/photoid.c
@@ -287,7 +287,8 @@ get_default_photo_command(void)
else if (!path_access ("display",X_OK))
return "display -title 'KeyID 0x%k' %i";
else if (getuid () && !path_access ("xdg-open", X_OK))
- return "xdg-open %i";
+ /* xdg-open spawns the actual program and exits so we need to keep the temp file */
+ return "xdg-open %I";
else
return "/bin/true";
#endif
--
2.30.1
_______________________________________________
Gnupg-devel mailing list
Gnupg-devel@gnupg.org
http://lists.gnupg.org/mailman/listinfo/gnupg-devel