diff options
Diffstat (limited to 'source/blender/editors/space_outliner/outliner_draw.c')
-rw-r--r-- | source/blender/editors/space_outliner/outliner_draw.c | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 91365e9e7de..cf9bf3de1b8 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -310,11 +310,15 @@ static void namebutton_cb(bContext *C, void *tsep, char *oldname) } /* Check the library target exists */ if (te->idcode == ID_LI) { - char expanded[FILE_MAXDIR + FILE_MAXFILE]; - BLI_strncpy(expanded, ((Library *)tselem->id)->name, FILE_MAXDIR + FILE_MAXFILE); + Library *lib= (Library *)tselem->id; + char expanded[FILE_MAX]; + + BKE_library_filepath_set(lib, lib->name); + + BLI_strncpy(expanded, lib->name, sizeof(expanded)); BLI_path_abs(expanded, G.main->name); if (!BLI_exists(expanded)) { - BKE_report(CTX_wm_reports(C), RPT_ERROR, "This path does not exist, correct this before saving"); + BKE_reportf(CTX_wm_reports(C), RPT_ERROR, "Library path '%s' does not exist, correct this before saving", expanded); } } } |