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_buttons/buttons_ops.c')
-rw-r--r--source/blender/editors/space_buttons/buttons_ops.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/source/blender/editors/space_buttons/buttons_ops.c b/source/blender/editors/space_buttons/buttons_ops.c
index 39fae43a877..05fdcd50067 100644
--- a/source/blender/editors/space_buttons/buttons_ops.c
+++ b/source/blender/editors/space_buttons/buttons_ops.c
@@ -100,7 +100,7 @@ static int file_browse_exec(bContext *C, wmOperator *op)
{
FileBrowseOp *fbo= op->customdata;
ID *id;
- char *base, *str, path[FILE_MAX];
+ char *str, path[FILE_MAX];
const char *path_prop= RNA_struct_find_property(op->ptr, "directory") ? "directory" : "filepath";
if (RNA_property_is_set(op->ptr, path_prop)==0 || fbo==NULL)
@@ -113,10 +113,9 @@ static int file_browse_exec(bContext *C, wmOperator *op)
char name[FILE_MAX];
id = fbo->ptr.id.data;
- base = (id && id->lib)? id->lib->filepath: G.main->name;
BLI_strncpy(path, str, FILE_MAX);
- BLI_path_abs(path, base);
+ BLI_path_abs(path, id ? ID_BLEND_PATH(G.main, id) : G.main->name);
if(BLI_is_dir(path)) {
str = MEM_reallocN(str, strlen(str)+2);