[Bf-committers] Windows BLI_getInstallationDir (aphex!)

Simon Clitherow bf-committers@blender.org
Wed, 7 Jan 2004 18:46:3 +0000


Strange one!  Unfortunately, the patch by itself breaks the reading and saving of .B.blend on Win9x (and I'd guess Win2k/XP?...)

A fairly easy fix but a pain... you need to prepend a '/' to the strings on lines 512 & 515 of util.c, line 426 in usiblender.c and line 1615 in writefile.c.

Commit away!!! ;)

Hopefully, we can end the Windoze Ctrl+U transition period soon (2.33?) and get some kind of sanity back... 

Hmm, maybe now would be a good time to bring up the ever popular topic: "Installation"... ;)



At 2004-01-07, 16:01:00 Nathan Letwory wrote:

>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;
>Bf-committers mailing list