Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/editors/space_file/file_ops.c')
-rw-r--r--source/blender/editors/space_file/file_ops.c13
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 132be9dfbc5..ff63dde7673 100644
--- a/source/blender/editors/space_file/file_ops.c
+++ b/source/blender/editors/space_file/file_ops.c
@@ -66,6 +66,7 @@
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
+#include <ctype.h>
/* for events */
#define NOTACTIVEFILE 0
@@ -1081,8 +1082,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
}
}