diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 16:10:33 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2018-06-05 17:33:46 +0300 |
commit | 481cdb08ed6f33a09d0e6843d1024db93c301178 (patch) | |
tree | 77166d130bfff2d5dca884676aaeff6bc0758f96 /source/blender/windowmanager/intern/wm_files_link.c | |
parent | 1d97e948d2c4867306e7fb5ce5fccf8b72c13391 (diff) |
Cleanup: use new accessors to blendfile path (Main.name).
Diffstat (limited to 'source/blender/windowmanager/intern/wm_files_link.c')
-rw-r--r-- | source/blender/windowmanager/intern/wm_files_link.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/source/blender/windowmanager/intern/wm_files_link.c b/source/blender/windowmanager/intern/wm_files_link.c index a2cd701b768..5f0c905dfd4 100644 --- a/source/blender/windowmanager/intern/wm_files_link.c +++ b/source/blender/windowmanager/intern/wm_files_link.c @@ -115,7 +115,7 @@ static int wm_link_append_invoke(bContext *C, wmOperator *op, const wmEvent *UNU } else if (G.relbase_valid) { char path[FILE_MAX]; - BLI_strncpy(path, G.main->name, sizeof(G.main->name)); + BLI_strncpy(path, BKE_main_blendfile_path_from_global(), sizeof(path)); BLI_parent_dir(path); RNA_string_set(op->ptr, "filepath", path); } @@ -297,7 +297,7 @@ static int wm_link_append_exec(bContext *C, wmOperator *op) BKE_reportf(op->reports, RPT_ERROR, "'%s': nothing indicated", path); return OPERATOR_CANCELLED; } - else if (BLI_path_cmp(bmain->name, libname) == 0) { + else if (BLI_path_cmp(BKE_main_blendfile_path(bmain), libname) == 0) { BKE_reportf(op->reports, RPT_ERROR, "'%s': cannot use current file as library", path); return OPERATOR_CANCELLED; } |