search for scripts in the release directory relative to the blender binary.
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jun 2010 13:31:50 +0000 (13:31 +0000)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jun 2010 13:31:50 +0000 (13:31 +0000)
source/blender/blenlib/intern/path_util.c

index 1917e6a..301b981 100644 (file)
@@ -844,11 +844,12 @@ static int gethome_path_local(char *targetpath, char *folder_name)
        i = s - bprogname + 1;
        BLI_strncpy(bprogdir, bprogname, i);
 
-       /* try release/folder_name (CWD relative) */
-       if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name))
+       /* try release/folder_name (BIN relative) */
+       if(test_data_path(targetpath, bprogdir, "release", folder_name))
                return 1;
 
-       if(test_data_path(targetpath, bprogdir, "release", folder_name))
+       /* try release/folder_name (CWD relative) */
+       if(test_data_path(targetpath, BLI_getwdN(cwd), "release", folder_name))
                return 1;
 
        /* try ./.blender/folder_name */