summaryrefslogtreecommitdiff
path: root/base/gp_os2pr.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2020-08-17 15:44:01 +0100
committerRobin Watts <Robin.Watts@artifex.com>2020-08-18 18:48:38 +0100
commit9619c8fc8d1e2548c737adfb7f6b8b15d49d20a4 (patch)
tree66996b49c28966cbb003ad260b236726768a676a /base/gp_os2pr.c
parentdf245b46c1a5290239b2932e2a5d1bdeae710c48 (diff)
downloadghostpdl-9619c8fc8d1e2548c737adfb7f6b8b15d49d20a4.tar.gz
Bug 702744: Add windows utf-8 handling for unlink and rename.
To do this, we introduce gp_unlink and gp_rename, and call those as appropriate. Also, make gp_open_scratch_file add the file to the permit list. When such a file is closed, it will be deleted from the permit list. It will also be removed from the permit list if the file is deleted using the PS deletefile operator. On closedown, if scratch files haven't been deleted, then we'll delete them as part of the closedown of gs_lib_ctx. This means that 'purging' the control lists must not remove scratch file paths from the list. Also, ensure that gsapi callers can't maliciously (or accidentally) remove scratch path paths from the list so as to leave them around after closedown.
Diffstat (limited to 'base/gp_os2pr.c')
-rw-r--r--base/gp_os2pr.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/base/gp_os2pr.c b/base/gp_os2pr.c
index 10cb3ab5b..ebbc50b37 100644
--- a/base/gp_os2pr.c
+++ b/base/gp_os2pr.c
@@ -154,6 +154,6 @@ os2_printer_fclose(gx_io_device * iodev, FILE * file)
os2_printer_t *pr = (os2_printer_t *)iodev->state;
fclose(file);
pm_spool(pr->memory, pr->filename, pr->queue);
- unlink(pr->filename);
+ unlink(pr->filename); /* unlink, not gp_unlink */
return 0;
}