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-05 10:26:10 +0400
committerCampbell Barton <ideasman42@gmail.com>2013-03-05 10:26:10 +0400
commit384948908afd5567d6c730a8045a368e8c08e436 (patch)
tree5fd9e156242aedd9271a8d54ed02b5dc9149fb44 /source/blender/editors/space_buttons
parent34233e7fd661dbd378c4e11a1e0d29ed639fbffa (diff)
patch [#34103] path_util_split_dirstring.patch, path_util_split_dirstring_2.patch, path_util_split_dirstring_3.patch
from Lawrence D'Oliveiro (ldo) Get rid of BLI_splitdirstring, replace with calls to BLI_split_dirfile, BLI_split_dir_part and BLI_split_file_part as appropriate.
Diffstat (limited to 'source/blender/editors/space_buttons')
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 812ea8c7597..bd53a8e41c5 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -113,7 +113,6 @@ static int file_browse_exec(bContext *C, wmOperator *op)
/* add slash for directories, important for some properties */
if (RNA_property_subtype(fbo->prop) == PROP_DIRPATH) {
- char name[FILE_MAX];
int is_relative = RNA_boolean_get(op->ptr, "relative_path");
id = fbo->ptr.id.data;
@@ -132,8 +131,10 @@ static int file_browse_exec(bContext *C, wmOperator *op)
}
BLI_add_slash(str);
}
- else
- BLI_splitdirstring(str, name);
+ else {
+ char * const lslash = (char *)BLI_last_slash(str);
+ if (lslash) lslash[1] = '\0';
+ }
}
RNA_property_string_set(&fbo->ptr, fbo->prop, str);