diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-08-17 15:44:01 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-08-18 18:48:38 +0100 |
commit | 9619c8fc8d1e2548c737adfb7f6b8b15d49d20a4 (patch) | |
tree | 66996b49c28966cbb003ad260b236726768a676a /pcl/pl | |
parent | df245b46c1a5290239b2932e2a5d1bdeae710c48 (diff) | |
download | ghostpdl-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 'pcl/pl')
-rw-r--r-- | pcl/pl/pjparse.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pcl/pl/pjparse.c b/pcl/pl/pjparse.c index eda0b8d22..a4e5f81a2 100644 --- a/pcl/pl/pjparse.c +++ b/pcl/pl/pjparse.c @@ -825,7 +825,7 @@ pjl_delete_file(pjl_parser_state_t * pst, char *pathname) pjl_parsed_filename_to_string(fname, pathname); if (pjl_verify_file_operation(pst, fname) < 0) return -1; - return unlink(fname); + return gp_unlink(pst->mem, fname); } /* handle pattern foo = setting, e.g. volume = "0:", name = 0:]pcl. |