[GRASS-dev] [GRASS GIS] #3637: Use the system temporary directory for all GUI rendering files
GRASS GIS
trac at osgeo.org
Sat Sep 15 13:37:13 PDT 2018
#3637: Use the system temporary directory for all GUI rendering files
-------------------------+-------------------------------------------------
Reporter: wenzeslaus | Owner: grass-dev@…
Type: defect | Status: closed
Priority: minor | Milestone: 8.0.0
Component: wxGUI | Version: svn-trunk
Resolution: fixed | Keywords: rendering PPM g.pnmcomp tempfile
CPU: | NamedTemporaryFile
Unspecified | Platform: Unspecified
-------------------------+-------------------------------------------------
Changes (by wenzeslaus):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"73334" 73334]:
{{{
#!CommitTicketReference repository="" revision="73334"
wxGUI/core: replace grass.script.tempfile by tempfile.NamedTemporaryFile
(fixes #3637)
Switches from mapset temporary directory to system temporary
directory which was previously set up for the session for
all GUI rendering files.
This also refactors and unifies handling of the temporary files related
to rendering, although on error and when removing/deleting the layers
removing of the files happens in the same way as before.
All files are now using NamedTemporaryFile instead of some using
g.tempfile and some NamedTemporaryFile. This means that when mapset
is switched, files are present in the (correct) session directory,
not incorrect mapset directory and then not deleted later.
(Deleting these files could cause rendering errors, while not deleting
them would lead to accumulating of files in mapset temporary directory).
See also:
* r28605 which adds glob for one delete when core.utils.GetTempfile(),
i.e., g.tempfile was still used (the glob part is still there)
* r56444 which adds mkstemp() for some of the files
* r60947 attempt to fix cleaning of deleting temporary files (#560)
which changes mkstemp to NamedTemporaryFile (still used now)
* r69085 which checked legend row file (legrow) name of last character
being digit (isdigit()) which was true for files from g.tempfile
but does not seem to have a reason (removed now)
* #3635 which investigates a suspicious cleanups of mapset temporary
directory which at this point seemed to be cleaning rendering files
from GUI (r37863, r21048)
}}}
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/3637#comment:1>
GRASS GIS <https://grass.osgeo.org>
More information about the grass-dev
mailing list