[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [39046] trunk/blender/source/blender/ editors/space_file/file_ops.c: fix [#28102] Typing 'C:' into the file selector's directory asks to make a new directory.
Campbell Barton
ideasman42 at gmail.com
Fri Aug 5 08:06:15 CEST 2011
Revision: 39046
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=39046
Author: campbellbarton
Date: 2011-08-05 06:06:15 +0000 (Fri, 05 Aug 2011)
Log Message:
-----------
fix [#28102] Typing 'C:' into the file selector's directory asks to make a new directory.
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_file/file_ops.c
Modified: trunk/blender/source/blender/editors/space_file/file_ops.c
===================================================================
--- trunk/blender/source/blender/editors/space_file/file_ops.c 2011-08-05 05:40:06 UTC (rev 39045)
+++ trunk/blender/source/blender/editors/space_file/file_ops.c 2011-08-05 06:06:15 UTC (rev 39046)
@@ -64,6 +64,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <ctype.h>
/* for events */
#define NOTACTIVEFILE 0
@@ -1079,8 +1080,18 @@
}
#ifdef WIN32
- if (sfile->params->dir[0] == '\0')
+ if (sfile->params->dir[0] == '\0') {
get_default_root(sfile->params->dir);
+ }
+ /* change "C:" --> "C:\", [#28102] */
+ else if ( (isalpha(sfile->params->dir[0]) &&
+ (sfile->params->dir[1] == ':')) &&
+ (sfile->params->dir[2] == '\0')
+
+ ) {
+ sfile->params->dir[2]= '\\';
+ sfile->params->dir[3]= '\0';
+ }
#endif
}
}
More information about the Bf-blender-cvs
mailing list