BPython:
-- Stephane Soppera (thanks) reported libc stat function fails for paths ending with "\" under win with free VC++ compiler toolkit 2003:
removed final '/' (BLI_make_file_string changes the '/' to '\\\\' for win) slashes from relevant paths, that should take care of it . Note: here (linux, glibc, gcc 3.3.3) stat doesn't have this problem. Also checking if U.pythondir ends with a slash and, if so (as long as its length > 2 to), removing the slash, for the same reason.
-- small cosmetic changes in BPY_menus.c for debug msgs and in header_scripts (added a separator in the Scripts win -> Scripts menu).
This commit is contained in:
@@ -81,12 +81,12 @@ char *bpy_gethome(int append_scriptsdir)
|
||||
if( strstr( s, ".blender" ) )
|
||||
PyOS_snprintf( homedir, FILE_MAXDIR, s );
|
||||
else
|
||||
BLI_make_file_string( "/", homedir, s, ".blender/" );
|
||||
BLI_make_file_string( "/", homedir, s, ".blender" );
|
||||
|
||||
/* if userhome/.blender/ exists, return it */
|
||||
if( BLI_exists( homedir ) ) {
|
||||
if (append_scriptsdir) {
|
||||
BLI_make_file_string("/", scriptsdir, homedir, "scripts/");
|
||||
BLI_make_file_string("/", scriptsdir, homedir, "scripts");
|
||||
if (BLI_exists (scriptsdir)) return scriptsdir;
|
||||
}
|
||||
else return homedir;
|
||||
@@ -99,11 +99,11 @@ char *bpy_gethome(int append_scriptsdir)
|
||||
i = s - bprogname + 1;
|
||||
|
||||
PyOS_snprintf( bprogdir, i, bprogname );
|
||||
BLI_make_file_string( "/", homedir, bprogdir, ".blender/" );
|
||||
BLI_make_file_string( "/", homedir, bprogdir, ".blender" );
|
||||
|
||||
if (BLI_exists(homedir)) {
|
||||
if (append_scriptsdir) {
|
||||
BLI_make_file_string("/", scriptsdir, homedir, "scripts/");
|
||||
BLI_make_file_string("/", scriptsdir, homedir, "scripts");
|
||||
if (BLI_exists(scriptsdir)) return scriptsdir;
|
||||
}
|
||||
else return homedir;
|
||||
@@ -111,7 +111,7 @@ char *bpy_gethome(int append_scriptsdir)
|
||||
|
||||
/* last try for scripts dir: blender in cvs dir, scripts/ inside release/: */
|
||||
if (append_scriptsdir) {
|
||||
BLI_make_file_string("/", scriptsdir, bprogdir, "release/scripts/");
|
||||
BLI_make_file_string("/", scriptsdir, bprogdir, "release/scripts");
|
||||
if (BLI_exists(scriptsdir)) return scriptsdir;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user