[Bf-committers] Small patch for HOME directory under Windows

Andrea Weikert andrea at aweikert.de
Sun Feb 27 22:55:36 CET 2005


Hi Ton,

yes, it is a small change, but it is to my best knowledge correct.

Without the patch, the MicrosoftVisualC++.NET 2003 compiler gives the following
warning:

\blender\source\blender\blenlib\intern\util.c(499) : warning C4129: '.' :
unrecognized character escape sequence

The \ character is used as the escape character, like in \n etc, so you'd have
to write

sprintf(dir, "%s\\.blender", ret) instead of sprintf(dir, "%s\.blender", ret) to
print the \ character to the string.

But since Windows does also understand the / as a path separator, it can also be
used. I decided to use the forward slash / because a few lines below, it is
already used for Windows already (in case the installation dir is used),
obviously without problems.

(line 509 in util.c): strcat(dir,"/.blender");

I have tested the patch by declaring a HOME environment variable on my WindowsXp
system and checking if Blender could save the user preferences correctly in that
dir and load them again.

It's certainly not a high priority stuff, since I guess that the vast majority
of windows users have their files in the installation directory anyway. If
desired, this could also be discussed shortly on IRC #blendercoders on one of
the next days and I could then provide a revised patch.

--- Andrea Weikert (Elubie)

----- Original Message ----- 
From: "Ton Roosendaal" <ton at blender.org>
To: "bf-blender developers" <bf-committers at projects.blender.org>
Sent: Sunday, February 27, 2005 7:38 PM
Subject: Re: [Bf-committers] Small patch for HOME directory under Windows


Hi,

I am no windows dev, but cannot see why this could work... the only
change is replacing a "\" with a "/". I thought windows prefers back
slashing?

-Ton-




More information about the Bf-committers mailing list