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:
authorCampbell Barton <ideasman42@gmail.com>2013-03-29 05:34:04 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-29 05:34:04 +0400
commite8105fbf5054eab80e742df3c6312d5fc64ebf05 (patch)
tree182c677209b3dbfca95ce9728537c7dd5c4e0c35 /source/blender/editors
parent10b4a86dbfd9ce56e53f5369258aebbac2f28be3 (diff)
minor fix for annoyance with directory selection on windows.
selecting a relative directory through BUTTONS_OT_directory_browse would convert '//' into '//\'.
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index dcc61cfa544..cf277957e70 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -120,6 +120,8 @@ static int file_browse_exec(bContext *C, wmOperator *op)
BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
if (BLI_is_dir(path)) {
+ /* do this first so '//' isnt converted to '//\' on windows */
+ BLI_add_slash(path);
if (is_relative) {
BLI_strncpy(path, str, FILE_MAX);
BLI_path_rel(path, G.main->name);
@@ -129,7 +131,6 @@ static int file_browse_exec(bContext *C, wmOperator *op)
else {
str = MEM_reallocN(str, strlen(str) + 2);
}
- BLI_add_slash(str);
}
else {
char * const lslash = (char *)BLI_last_slash(str);