Ignore:
Timestamp:
Jan 3, 2018, 3:16:38 AM (8 years ago)
Author:
Alex Taylor
Message:

Fix crash when PPD filename cannot be resolved.
Fix broken CUPS directory resolution in PPD lookup.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gui/printer/cupswiz/cupswiz.VRX

    r59 r63  
    388388    cups_etc = globals.!cupsdir'\etc'
    389389    IF \VRIsDir( cups_etc'\cups\ppd') THEN
    390         cups_etc = globals.!cupsdrv'\etc'
     390        cups_etc = globals.!cupsroot'\etc'
    391391    IF \VRIsDir( cups_etc'\cups\ppd') THEN
    392392        cups_etc = VALUE('ETC',,'OS2ENVIRONMENT')
     
    437437                 * to get the exact model name.
    438438                 */
     439                CALL LINEOUT globals.!log1, 'No PPD yet, looking for' cups_etc'\cups\ppd\'globals.!prt_name'.ppd'
    439440                cups_ppd = STREAM( cups_etc'\cups\ppd\'globals.!prt_name'.ppd', 'C', 'QUERY EXISTS')
    440                 globals.!prt_nick = GetNameFromPPD( cups_ppd )
     441                IF cups_ppd <> '' THEN
     442                    globals.!prt_nick = GetNameFromPPD( cups_ppd )
     443                ELSE
     444                    CALL LINEOUT globals.!log1, 'PPD not found. Looking for model:' globals.!os2driver'.'globals.!prt_nick
    441445            END
    442446            drv_model = PrinterExistsInDRV( globals.!os2driver, globals.!prt_nick )
     
    12261230    CALL LINEOUT globals.!log1, '--[' datestr ']' ||,
    12271231                 COPIES('-', 73 - LENGTH( datestr ))
     1232
     1233    CALL LINEOUT globals.!log1, 'System boot volume:'      TRANSLATE( globals.!bootdrv )
     1234    CALL LINEOUT globals.!log1, 'Local CUPS directory:'    TRANSLATE( globals.!cupsdir )
     1235    CALL LINEOUT globals.!log1, 'Local driver repository:' TRANSLATE( globals.!repository )
     1236    CALL LINEOUT globals.!log1, ''
     1237
    12281238RETURN
    12291239
     
    20012011    CALL NLSSetText 'SW_ABOUT',  'Caption', 10                                          /* 10: Product Information */
    20022012    CALL NLSSetText 'DT_ABOUT1', 'Caption', 11                                          /* 11: eCups Printer Install Utility */
    2003     CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '1.13'                                  /* 12: Version %1 */
     2013    CALL NLSSetText 'DT_ABOUT2', 'Caption', 12, '1.15'                                  /* 12: Version %1 */
    20042014    CALL NLSSetText 'DT_ABOUT3', 'Caption', 13, '2010-2017'                             /* 13: (C) %1 Alex Taylor */
    20052015    CALL NLSSetText 'PB_ABOUT',  'Caption', 2                                           /* 10: Product Information */
Note: See TracChangeset for help on using the changeset viewer.