[gs-bugs] [Bug 691350] gs_init.ps tried in current dir despite -P-

bugzilla-daemon at ghostscript.com bugzilla-daemon at ghostscript.com
Sun May 30 04:15:09 UTC 2010


http://bugs.ghostscript.com/show_bug.cgi?id=691350

Ray Johnston <ray.johnston at artifex.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P4                          |P3
           Platform|PC                          |All
         OS/Version|Linux                       |All

--- Comment #1 from Ray Johnston <ray.johnston at artifex.com> 2010-05-30 04:15:08 UTC ---
Well, you are right. The startup code has a rather unfortunate mode of
'search_with_no_combine' when gs_main_lib_open calls lib_file_open:
------------------------------------------------------------------------
    bool starting_arg_file = (i_ctx_p == NULL) ? true :
               i_ctx_p->starting_arg_file;
    bool search_with_no_combine = false;
---SNIP---
    if (gp_file_name_is_absolute(fname, flen)) {
       search_with_no_combine = true;
       search_with_combine = false;
    } else {
       search_with_no_combine = starting_arg_file;
       search_with_combine = true;
    }
    if (search_with_no_combine) {
        uint blen1 = blen;

        if (gp_file_name_reduce(fname, flen, buffer, &blen1) != 
                  gp_combine_success)
            goto skip;
        if (iodev_os_open_file(iodev, (const char *)buffer, blen1,
                                (const char *)fmode, &s, (gs_memory_t *)mem) == 
            0)
------------------------------------------------------------------------

I guess this is a real bug. At the very least we need to observe the
minst->search_here_first condition (as set by the -P- flag), but it is
not clear to me that we ever should search without combine, except for
the case when gp_file_name_is_absolute( ) returns true.

-- 
Configure bugmail: http://bugs.ghostscript.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.


More information about the gs-bugs mailing list