Making wine complain if profile dir isn't valid

Paul Millar paulm at astro.gla.ac.uk
Sun May 12 15:53:48 CDT 2002


Hi,

Got caught out by a "gotcha", where %USERPROFILE% was not mapped into the
correct directory because the directory didn't exist. A valid
%USERPROFILE% is a requirement of one of Juergen regression tests
(%USERPROFILE%\\subdir1 > 25).

The attached patch will make wine emit a warning if the directory isn't
valid.  This is "the right thing", isn't it?

ChangeLog:
   Wine now warns if Profile directory doesn't exist.

----
Paul Millar
-------------- next part --------------
Index: files/directory.c
===================================================================
RCS file: /home/wine/wine/files/directory.c,v
retrieving revision 1.46
diff -u -r1.46 directory.c
--- files/directory.c	9 May 2002 19:35:22 -0000	1.46
+++ files/directory.c	12 May 2002 20:39:59 -0000
@@ -165,7 +165,7 @@
     TRACE("Cwd        = %c:\\%s\n",
           'A' + drive, DRIVE_GetDosCwd( drive ) );
 
-    if (DIR_GetPath( "profile", "", &profile_dir, longpath, FALSE ))
+    if (DIR_GetPath( "profile", "", &profile_dir, longpath, TRUE ))
     {
         TRACE("USERPROFILE= %s\n", longpath );
         SetEnvironmentVariableA( "USERPROFILE", longpath );


More information about the wine-patches mailing list