From 4e1d71fd8ddc07bcd4219cf1be9ed11efd70271c Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Mon, 15 May 2006 12:18:47 +0000 Subject: [PATCH] Commit from Alexander to store last 10 saved entries didn't work proper. It always set G.sce to zero... for example on a F1 press the current directory wasn't set to last saved file. --- source/blender/src/usiblender.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 0560b963c9c..ec5a86471ec 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -467,18 +467,19 @@ static void readBlog(void) BLI_make_file_string("/", name, BLI_gethome(), ".Blog"); lines= BLI_read_file_as_lines(name); - for (num= 0; num<10; num++) G.recent[num][0]=0; + for (num= 0; num<10; num++) G.recent[num][0]= 0; + for (l= lines, num= 0; l && (num<10); l= l->next, num++) { line = l->link; if (!BLI_streq(line, "")) { if (num==0) strcpy(G.sce, line); strcpy(G.recent[num], line); - } else { -// BLI_make_file_string("/", G.sce, BLI_gethome(), "untitled.blend"); - G.sce[0] = 0; } } + if(G.sce[0] == 0) + BLI_make_file_string("/", G.sce, BLI_gethome(), "untitled.blend"); + BLI_free_file_lines(lines); #ifdef WIN32