[Bf-blender-cvs] [e7a2a0e] compositor-2016: Fix T48111: Auto-run fails w/ empty paths

Campbell Barton noreply at git.blender.org
Wed Jun 8 21:52:39 CEST 2016


Commit: e7a2a0efa15742951100e41422e3645a333f7857
Author: Campbell Barton
Date:   Fri Jun 3 15:28:32 2016 +1000
Branches: compositor-2016
https://developer.blender.org/rBe7a2a0efa15742951100e41422e3645a333f7857

Fix T48111: Auto-run fails w/ empty paths

Enabling auto-run, then excluding a path but leaving it set to a blank value would ignore all paths.

===================================================================

M	source/blender/blenkernel/intern/autoexec.c

===================================================================

diff --git a/source/blender/blenkernel/intern/autoexec.c b/source/blender/blenkernel/intern/autoexec.c
index d9462cd..bde06b0 100644
--- a/source/blender/blenkernel/intern/autoexec.c
+++ b/source/blender/blenkernel/intern/autoexec.c
@@ -59,7 +59,10 @@ bool BKE_autoexec_match(const char *path)
 	BLI_assert((U.flag & USER_SCRIPT_AUTOEXEC_DISABLE) == 0);
 
 	for (path_cmp = U.autoexec_paths.first; path_cmp; path_cmp = path_cmp->next) {
-		if ((path_cmp->flag & USER_PATHCMP_GLOB)) {
+		if (path_cmp->path[0] == '\0') {
+			/* pass */
+		}
+		else if ((path_cmp->flag & USER_PATHCMP_GLOB)) {
 			if (fnmatch(path_cmp->path, path, fnmatch_flags) == 0) {
 				return true;
 			}




More information about the Bf-blender-cvs mailing list