Ignore:
Timestamp:
Feb 17, 2006, 1:32:04 AM (20 years ago)
Author:
pr
Message:

Remove redundant writes/backups to CONFIG.SYS - bug 269

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/cppbase/bs_config.cpp

    r285 r308  
    617617 *
    618618 *@@changed V0.9.7 (2001-01-15) [umoeller]: now using csysLoadConfigSys
     619 *@@changed WarpIN V1.0.9 (2006-02-16) [pr]: added _pszContentOld
    619620 */
    620621
    621622BSConfigSys::BSConfigSys() : BSRoot(tBSConfigSys)
    622623{
    623     _pszContent = NULL;
     624    _pszContent = _pszContentOld = NULL;
    624625
    625626    /* sprintf(_szFilename, "%c:\\config.sys", doshQueryBootDrive());
     
    632633    if (arc != NO_ERROR)
    633634        throw BSConfigExcpt(CFGEXCPT_OPEN, arc);
     635    else
     636        _pszContentOld = strhdup(_pszContent, NULL);
    634637
    635638    _fDirty = FALSE;
     
    642645 *      This does _not_ write the file. Use BSConfigSys::Flush()
    643646 *      before deleting an instance of this.
     647 *
     648 *@@changed WarpIN V1.0.9 (2006-02-16) [pr]: added _pszContentOld
    644649 */
    645650
     
    648653    if (_pszContent)
    649654        free(_pszContent);
     655
     656    if (_pszContentOld)
     657        free(_pszContentOld);
    650658}
    651659
     
    766774 *@@changed V0.9.3 (2000-05-12) [umoeller]: added pszBackup
    767775 *@@changed V0.9.6 (2000-10-27) [umoeller]: added check if contents are dirty
     776 *@@changed WarpIN V1.0.9 (2006-02-16) [pr]: added _pszContentOld
    768777 */
    769778
     
    774783    int irc = 0;
    775784
    776     if (_fDirty)
     785    // WarpIN V1.0.9 (2006-02-16) [pr]: Check for content modification @@fixes 269
     786    if (   _fDirty
     787        && strhcmp (_pszContent, _pszContentOld)
     788       )
    777789    {
    778790        PSZ pszBackup = NULL;
Note: See TracChangeset for help on using the changeset viewer.