[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [36507] trunk/blender/source/blender/ blenlib/intern/path_util.c: [#26715] Blender2. 57 crash when opening in Windows, non-latin char in path

Campbell Barton ideasman42 at gmail.com
Fri May 6 03:03:37 CEST 2011


Revision: 36507
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=36507
Author:   campbellbarton
Date:     2011-05-06 01:03:36 +0000 (Fri, 06 May 2011)
Log Message:
-----------
[#26715] Blender2.57 crash when opening in Windows, non-latin char in path
this isn't a fix but GetModuleFileName is returning a name that doesn't exist, so finding python after this isn't working.

Show a popup that the path has an invalid name so at least the user can move it.

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	2011-05-05 22:41:49 UTC (rev 36506)
+++ trunk/blender/source/blender/blenlib/intern/path_util.c	2011-05-06 01:03:36 UTC (rev 36507)
@@ -1692,6 +1692,10 @@
 #ifdef _WIN32
 	if(GetModuleFileName(0, fullname, maxlen)) {
 		GetShortPathName(fullname, fullname, maxlen);
+		if(!BLI_exists(fullname)) {
+			printf("path can't be found: \"%.*s\"\n", maxlen, fullname);
+			MessageBox(NULL, "path constains invalid characters or is too long (see console)", "Error", MB_OK);
+		}
 		return;
 	}
 #endif




More information about the Bf-blender-cvs mailing list