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.
This commit is contained in:
Ton Roosendaal
2006-05-15 12:18:47 +00:00
parent f2c043082a
commit 4e1d71fd8d

View File

@@ -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