[Bf-committers] Windows BLI_getInstallationDir (aphex!)

Nathan Letwory bf-committers@blender.org
Wed, 07 Jan 2004 16:01:13 +0200

The function BLI_getInstallationDir (blenlib/intern/winstuff.c) always 
returns a directory with a slash at the end. This makes BLI_exists() at
line 508 of util.c think that the directory does not exist, thus it gets 
to line 527 (util.c) where it should not go (recreating the "Not A 
Number/Blender" directory, which we obviously don't want anymore). To 
fix this a slight alteration of BLI_getInstallationDir will do the 
trick. Patch for the file at the end of the mail.

If this turns out to be ok, I'd like to commit.

/Nathan Letwory

Index: source/blender/blenlib/intern/winstuff.c
RCS file: 
retrieving revision 1.7
diff -r1.7 winstuff.c
 > 	int a;
 > 	a = strlen(dir);
 > 	if(dir[a-1]=='\\') dir[a-1]=0;