[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [30176] trunk/blender/source/blender/ blenlib/intern/path_util.c: Ensure that local installations ( also known as portable installations) are possible again.

Nathan Letwory nathan at letworyinteractive.com
Sat Jul 10 13:09:26 CEST 2010


Revision: 30176
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=30176
Author:   jesterking
Date:     2010-07-10 13:09:26 +0200 (Sat, 10 Jul 2010)

Log Message:
-----------
Ensure that local installations (also known as portable installations) are possible again.

For user config and data files, first check the 'local' location (where the executable is located), and only then the actual user locations (whatever the convention for the OSes; $HOME, %APPDATA%, etc).

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/intern/path_util.c

Modified: trunk/blender/source/blender/blenlib/intern/path_util.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/path_util.c	2010-07-10 07:38:49 UTC (rev 30175)
+++ trunk/blender/source/blender/blenlib/intern/path_util.c	2010-07-10 11:09:26 UTC (rev 30176)
@@ -1064,13 +1064,14 @@
 	switch (folder_id) {
 		case BLENDER_DATAFILES:		/* general case */
 			BLI_join_dirfile(search_path, "datafiles", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES"))	break;
-			if (get_path_local(path, search_path)) break;
 			if (get_path_system(path, search_path, "BLENDER_SYSTEM_DATAFILES")) break;
 			return NULL;
 			
-		case BLENDER_USER_DATAFILES:		
+		case BLENDER_USER_DATAFILES:
 			BLI_join_dirfile(search_path, "datafiles", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_DATAFILES"))	break;
 			return NULL;
 			
@@ -1081,13 +1082,14 @@
 			
 		case BLENDER_CONFIG:		/* general case */
 			BLI_join_dirfile(search_path, "config", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break;
-			if (get_path_local(path, search_path)) break;
 			if (get_path_system(path, search_path, "BLENDER_SYSTEM_CONFIG")) break;
 			return NULL;
 			
 		case BLENDER_USER_CONFIG:
 			BLI_join_dirfile(search_path, "config", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_CONFIG")) break;
 			return NULL;
 			
@@ -1098,13 +1100,14 @@
 			
 		case BLENDER_SCRIPTS:		/* general case */
 			BLI_join_dirfile(search_path, "scripts", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break;		
-			if (get_path_local(path, search_path)) break;
 			if (get_path_system(path, search_path, "BLENDER_SYSTEM_SCRIPTS")) break;
 			return NULL;
 			
 		case BLENDER_USER_SCRIPTS:
 			BLI_join_dirfile(search_path, "scripts", subfolder);
+			if (get_path_local(path, search_path)) break;
 			if (get_path_user(path, search_path, "BLENDER_USER_SCRIPTS")) break;
 			return NULL;
 			
@@ -1121,7 +1124,6 @@
 			
 		case BLENDER_SYSTEM_PYTHON:
 			BLI_join_dirfile(search_path, "python", subfolder);
-			
 			if (get_path_system(path, search_path, "BLENDER_SYSTEM_PYTHON")) break;
 			return NULL;
 	}





More information about the Bf-blender-cvs mailing list