[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [bug-gv] Working around gs issues by changing to a safe working dir
From: |
Bernhard R. Link |
Subject: |
Re: [bug-gv] Working around gs issues by changing to a safe working dir |
Date: |
Fri, 4 Jun 2010 10:32:41 +0200 |
User-agent: |
Mutt/1.5.18 (2008-05-17) |
* Markus Steinborn <address@hidden> [100603 13:31]:
> Thanks. Attached patch should help, but may have regressions.
> /*### initialization of global variables based on resource
> ##################*/
> + if (access(gv_safe_gs_workdir, R_OK | X_OK))
> + {
> + char buffer[512];
> + strcpy(buffer, app_res.scratch_dir);
> + strcat(buffer,"gv-safe-workdir-XXXXXX");
> + gv_safe_gs_workdir = mkdtemp(buffer);
I think scratch_dir is allowed to start with "~/" which in other places
is replaced with the home directory using file_translateTildeInPath.
(though I think having a copy of that variable that is already expanded
would allow simplifications and perhaps removal of static buffers in many
places)).
Bernhard R. Link