Changeset 143


Ignore:
Timestamp:
Oct 24, 2006, 12:47:25 AM (19 years ago)
Author:
dmik
Message:

Common: System Exceptions:

  • Fixed: Using HOMEDRIVE/HOMEPATH to point to the home directory didn't work;
  • Improved: Paths specified in HOME and HOMEDRIVE/HOMEPATH are resolved to full paths before using.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/tools/qsysxcpt_pm.cpp

    r139 r143  
    6565    - must be instantiated on the stack of the main thread only
    6666    - must be instantiated before a QAplication instance is created
     67      (does nothing otherwise)
    6768*/
    6869
     
    538539        return NULL;
    539540
    540     strcpy( szFileName, pcszBasePath );
     541    // get the full path if it's not 'X:'
     542    if ( strlen(pcszBasePath) != 2 ||
     543         pcszBasePath[1] != ':' )
     544    {
     545        if( DosQueryPathInfo( pcszBasePath, FIL_QUERYFULLNAME,
     546                              szFileName, cbFileName ) != NO_ERROR )
     547            return NULL;
     548    }
     549    else
     550        strcpy( szFileName, pcszBasePath );
     551   
    541552    strcat( szFileName, szDir );
    542553    if ( access( szFileName, F_OK ) != 0 )
     
    696707                     strlen( pszHomeDrive ) + strlen( pszHomePath ) < CCHMAXPATH )
    697708                {
    698                     strcpy( szFileName, pszHomeDrive );
    699                     strcat( szFileName, pszHomePath );
    700                     file = qt_excOpenLogFile( szFileName, szFileName );
     709                    char szHomePath[CCHMAXPATH];
     710                    strcpy( szHomePath, pszHomeDrive );
     711                    strcat( szHomePath, pszHomePath );
     712                    file = qt_excOpenLogFile( szHomePath, szFileName );
    701713                }
    702714            }
Note: See TracChangeset for help on using the changeset viewer.