Ignore:
Timestamp:
Aug 18, 1999, 6:44:45 PM (26 years ago)
Author:
phaller
Message:

Fix: Christoph Bratschi's Profile Fix for flushing the profiles

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/kernel32/profile.cpp

    r543 r547  
    1 /* $Id: profile.cpp,v 1.13 1999-08-18 10:56:53 sandervl Exp $ */
     1/* $Id: profile.cpp,v 1.14 1999-08-18 16:44:45 phaller Exp $ */
    22
    33/*
     
    158158    for ( ; section; section = section->next)
    159159    {
    160         if (section->name) fprintf( file, "\n[%s]\n", section->name );
     160        if (section->name) fprintf( file, "\r\n[%s]\r\n", section->name );
    161161        for (key = section->key; key; key = key->next)
    162162        {
    163163            fprintf( file, "%s", key->name );
    164164            if (key->value) fprintf( file, "=%s", key->value );
    165             fprintf( file, "\n" );
     165            fprintf( file, "\r\n" );
    166166        }
    167167    }
     
    506506    /* check for path */
    507507
    508     if ((!strchr( filename,'/') &&
    509         !strchr( filename,'\\')) ||
     508    if (!strchr( filename,'/') ||
     509        !strchr( filename,'\\') ||
    510510        !strchr( filename,':'))
    511511    {
     
    905905            PROFILE_WineProfile = PROFILE_Load( f );
    906906            fclose( f );
    907             strncpy(PROFILE_WineIniUsed,buffer,MAX_PATHNAME_LEN-1);
     907       strncpy(PROFILE_WineIniUsed,buffer,MAX_PATHNAME_LEN-1);
    908908            return 1;
    909909        }
     
    11771177    BOOL ret = FALSE;
    11781178
    1179     dprintf(("WritePrivateProfileStringA: %s %s %s", section, entry, string));
    11801179    EnterCriticalSection( &PROFILE_CritSect );
    11811180
     
    13991398    INT x;
    14001399
    1401     dprintf(("WriteOutProfiles"));
    14021400    EnterCriticalSection(&PROFILE_CritSect);
    1403     PROFILE_FlushFile(); //flash current
    1404     lastCurProfile = CurProfile;
    1405     for(x = 1;x < N_CACHED_PROFILES;x++)
    1406     {
    1407       if (MRUProfile[x])
     1401    if (MRUProfile && CurProfile->filename)
     1402    {
     1403      PROFILE_FlushFile(); //flash current
     1404      lastCurProfile = CurProfile;
     1405      for(x = 1;x < N_CACHED_PROFILES;x++)
     1406      {
    14081407        if (MRUProfile[x]->filename)
    14091408        {
     
    14111410          PROFILE_FlushFile();
    14121411        }
    1413     }
    1414     CurProfile = lastCurProfile;
     1412      }
     1413      CurProfile = lastCurProfile;
     1414    }
    14151415    LeaveCriticalSection(&PROFILE_CritSect);
    14161416}
    14171417
     1418
Note: See TracChangeset for help on using the changeset viewer.