Ignore:
Timestamp:
Aug 13, 2002, 9:51:19 PM (23 years ago)
Author:
umoeller
Message:

Minor updates.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/helpers/apps.c

    r201 r208  
    850850 *@@changed V0.9.12 (2001-05-27) [umoeller]: moved from winh.c to apps.c
    851851 *@@changed V0.9.20 (2002-07-03) [umoeller]: now always qualifying executable to fix broken BAT files
     852 *@@changed V0.9.21 (2002-08-12) [umoeller]: this didn't work for batch and cmd files that had "+" characters in their full path, fixed
    852853 */
    853854
     
    866867    PSZ     pszOldParams = NULL;
    867868    ULONG   ulOldParamsLength = pstrParams->ulLength;
     869    BOOL    fQuotes = FALSE;
     870
    868871    if (ulOldParamsLength)
    869872        // we have parameters already:
     
    873876    // set new params to "/C filename.cmd"
    874877    xstrcpy(pstrParams, "/C ", 0);
     878
     879    // if the path has spaces, or other invalid characters,
     880    // include it in quotes V0.9.21 (2002-08-12) [umoeller]
     881    if (fQuotes = !!strpbrk(pProgDetails->pszExecutable, " +&|"))
     882        xstrcatc(pstrParams, '"');
     883
     884    #ifdef DEBUG_PROGRAMSTART
     885        _PmpfF(("fQuotes (parameters need quotes) is %d", fQuotes));
     886    #endif
     887
    875888    xstrcat(pstrParams,
    876889            pProgDetails->pszExecutable,
    877890            0);
     891
     892    if (fQuotes)
     893        xstrcatc(pstrParams, '"');      // V0.9.21 (2002-08-12) [umoeller]
    878894
    879895    if (pszOldParams)
Note: See TracChangeset for help on using the changeset viewer.