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;
                        }

_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to