diff options
author | Campbell Barton <ideasman42@gmail.com> | 2011-08-05 10:06:15 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2011-08-05 10:06:15 +0400 |
commit | 82e863bdae70b1297318aa7fd98f72cab074ef66 (patch) | |
tree | 438343fce03b2b573ae95850c575c9239933f673 /source/blender/editors/space_file/file_ops.c | |
parent | f77af0a8cef8e7be6245c6f4c52dd05f6c7a387f (diff) |
fix [#28102] Typing 'C:' into the file selector's directory asks to make a new directory.
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r-- | source/blender/editors/space_file/file_ops.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 77524c7e117..d4253495e97 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -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 @@ static void file_expand_directory(bContext *C) } #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 } } |