Bug 694512 - "valid resource directory" warning doesn't test what it should
Summary: "valid resource directory" warning doesn't test what it should
Status: RESOLVED WONTFIX
Alias: None
Product: Ghostscript
Classification: Unclassified
Component: PS Interpreter (show other bugs)
Version: master
Hardware: All All
: P4 normal
Assignee: Ray Johnston
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-10 06:25 UTC by Chapman Flack
Modified: 2021-10-09 15:03 UTC (History)
0 users

See Also:
Customer:
Word Size: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Chapman Flack 2013-08-10 06:25:26 UTC
The "GenericResourceDir doesn't point to a valid resource directory"
warning in gs_res.ps doesn't test the correct condition.

The current test only attempts 'status' on
GenericResourceDir (Init) GenericResourcePathSep (gs_init.ps)
which is incorrect if GenericResourceDir is a relative path
as described in Use.htm section 8.1.

For starters, in the case of a relative path, this test ends up
looking for the GenericResourceDir in whatever working directory
ghostscript was started in, rather than appending the relative
path to the search path elements as Use.htm specifies.

Moreover, the whole point of the search path behavior is to allow
multiple Resource trees contributing to the total collection of
resources, and it's to be expected that most of these will *not*
contain Init/gs_init.ps.  Most likely, that's only going to be in
ghostscript's own as-installed Resource tree, probably the last one
on the path.

This test really needs to invoke the same search algorithm normally
used to follow the resource search path, and only complain if it
didn't find Init/gs_init.ps *anywhere*.
Comment 1 Ken Sharp 2013-08-12 04:30:13 UTC
see also bug #694509.
Comment 2 Ken Sharp 2021-10-09 15:03:00 UTC
After 8 years I no longer remember anything about this. The linked bug is marked as resolved/Fixed so I'm closing this one.

If there is still a problem then can I ask that a new bug report is opened, along with a complete description of how to demonstrate the bug.