From 4a04f7206914a49f5f95adc5eb786237f1a9f547 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sun, 23 Oct 2011 17:52:20 +0000 Subject: remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n --- source/blender/editors/space_outliner/outliner_draw.c | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_outliner/outliner_draw.c') diff --git a/source/blender/editors/space_outliner/outliner_draw.c b/source/blender/editors/space_outliner/outliner_draw.c index 10ca482ae0e..608a3c4c0b2 100644 --- a/source/blender/editors/space_outliner/outliner_draw.c +++ b/source/blender/editors/space_outliner/outliner_draw.c @@ -310,11 +310,19 @@ 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]; + + BLI_strncpy(expanded, lib->name, sizeof(expanded)); + + /* even though we already set the name this syncs the absolute + * path, this is intentionally not already expanded yet to + * avoid copying lib->name to its self. */ + BKE_library_filepath_set(lib, 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); } } } -- cgit v1.2.3