From 4da179749eb8d6b53f5c2eba4b3e4132656c3d4f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 5 Jun 2010 21:19:59 +0000 Subject: - [#22492] [29159] commit breaks importing of script file that has a reload to self in it broke when including the blend path in the modules filename. - new function BLI_path_basename(), matches pythons os.path.basename(). replace a number of cases where BLI_split_dirfile was being used to get the filename only. --- source/blender/windowmanager/intern/wm_operators.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'source/blender/windowmanager/intern/wm_operators.c') diff --git a/source/blender/windowmanager/intern/wm_operators.c b/source/blender/windowmanager/intern/wm_operators.c index 842e43b98cf..4ab110cc275 100644 --- a/source/blender/windowmanager/intern/wm_operators.c +++ b/source/blender/windowmanager/intern/wm_operators.c @@ -1212,10 +1212,7 @@ static uiBlock *wm_block_create_splash(bContext *C, ARegion *ar, void *arg_unuse col = uiLayoutColumn(split, 0); uiItemL(col, "Recent", 0); for(recent = G.recent_files.first, i=0; (i<5) && (recent); recent = recent->next, i++) { - char *display_name= BLI_last_slash(recent->filename); - if(display_name) display_name++; /* skip the slash */ - else display_name= recent->filename; - uiItemStringO(col, display_name, ICON_FILE_BLEND, "WM_OT_open_mainfile", "path", recent->filename); + uiItemStringO(col, BLI_path_basename(recent->filename), ICON_FILE_BLEND, "WM_OT_open_mainfile", "path", recent->filename); } uiItemS(col); uiItemO(col, NULL, ICON_RECOVER_LAST, "WM_OT_recover_last_session"); -- cgit v1.2.3