Fixes for profile handling

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





ChangeLog:

     Increase the PROFILE_MAX_LINE_LEN constant value.
     Force profile files to be reloaded if their timestamp has changed.

Description:

     The caching code for profiles wasn't regenerating the cached copy if
someone
     changed an .ini file while wine was running.  This change forces it to
     reread the file if it has been modified.

Warren Baird : Warren_Baird@cimmetry.com

diff -ur clean/wine/files/profile.c wine/files/profile.c
--- clean/wine/files/profile.c     Wed Jan 29 15:31:01 2003
+++ wine/files/profile.c Thu Jan 23 12:09:03 2003
@@ -83,7 +83,7 @@

 #define CurProfile (MRUProfile[0])

-#define PROFILE_MAX_LINE_LEN   1024
+#define PROFILE_MAX_LINE_LEN   4096

 /* Check for comments in profile */
 #define IS_ENTRY_COMMENT(str)  ((str)[0] == ';')
@@ -600,12 +600,19 @@
              CurProfile=tempProfile;
             }
           if(!stat(CurProfile->unix_name,&buf) &&
CurProfile->mtime==buf.st_mtime)
-             TRACE("(%s): already opened (mru=%d)\n",
+           {
+               TRACE("(%s): already opened (mru=%d)\n",
                              debugstr_w(filename), i );
-          else
+               /* it's safe to return now */
+               return TRUE;
+           }
+          else
+           {
               TRACE("(%s): already opened, needs refreshing (mru=%d)\n",
                              debugstr_w(filename), i );
-      return TRUE;
+                /* file is in cache but not up to date, just break the loop */
+                break;
+           }
          }
       }





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux