C D wrote:
  Dear all,

I don't know if this is a bug of gv (could be something else) and I have not investigated the problem further, therefore I did not file a bug report.
There is actually a minor bug in GNU gv, but there is another one in the MacPorts gv package: "/opt/local/share/gv/safe-gs-workdir" is not created at install time.

Because of the missing "/opt/local/share/gv/safe-gs-workdir" a temporary directory is used, and handling this temporary directory has a minor bug (but normally the above directory should be present, so this bug is really minor!).

Anyway, the attached patch should fix the minor bug in GNU gv.


Greetings from Germany

Markus Steinborn
GNU gv maintainer

diff --git a/src/main.c b/src/main.c
index 31b1720..c7df70f 100644
--- a/src/main.c
+++ b/src/main.c
@@ -704,7 +704,7 @@ int main(argc, argv)
 	strcpy(buffer, app_res.scratch_dir);
 	strcat(buffer,"gv-safe-workdir-XXXXXX");
 	file_translateTildeInPath(buffer);
-        gv_safe_gs_workdir = mkdtemp(buffer);
+        gv_safe_gs_workdir = strdup(mkdtemp(buffer));
 	gv_safe_gs_tempdir = 1;
 
 	if (!gv_safe_gs_workdir)

Reply via email to