2.5: python module name for import had trailing "."
authorBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 21 Jul 2009 10:40:13 +0000 (10:40 +0000)
committerBrecht Van Lommel <brechtvanlommel@pandora.be>
Tue, 21 Jul 2009 10:40:13 +0000 (10:40 +0000)
source/blender/python/intern/bpy_interface.c

index 1a2bb57a423dbaf4c4d637a7fc84d235928eb4b3..ef2406d446cd267c4abd1b1806e0a1dc8ca53498 100644 (file)
@@ -494,7 +494,7 @@ void BPY_run_ui_scripts(bContext *C, int reload)
                        else if ((file_extension = strstr(de->d_name, ".py"))) {
                                /* normal py files? */
                                if(file_extension && file_extension[3] == '\0') {
-                                       de->d_name[(file_extension - de->d_name) + 1] = '\0';
+                                       de->d_name[(file_extension - de->d_name)] = '\0';
                                        err= bpy_import_module(de->d_name, reload);
                                }
                        }