fixed a memory leaks

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@181 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Enrico Tröger 2006-02-10 20:45:25 +00:00
parent f0e0e31203
commit a232d7e15d

View File

@ -1014,23 +1014,25 @@ gboolean utils_check_disk_status(gint idx, const gboolean force)
{ {
if (force) if (force)
{ {
document_open_file(idx, NULL, 0, doc_list[idx].readonly); document_open_file(idx, NULL, 0, doc_list[idx].readonly, doc_list[idx].file_type);
} }
else else
{ {
gchar *basename = g_path_get_basename(doc_list[idx].file_name);
buff = g_strdup_printf(_ buff = g_strdup_printf(_
("The file '%s' on the disk is more recent than\n" ("The file '%s' on the disk is more recent than\n"
"the current buffer.\nDo you want to reload it?"), g_path_get_basename(doc_list[idx].file_name)); "the current buffer.\nDo you want to reload it?"), basename);
if (dialogs_show_reload_warning(buff)) if (dialogs_show_reload_warning(buff))
{ {
document_open_file(idx, NULL, 0, doc_list[idx].readonly); document_open_file(idx, NULL, 0, doc_list[idx].readonly, doc_list[idx].file_type);
doc_list[idx].last_check = t; doc_list[idx].last_check = t;
} }
else else
doc_list[idx].mtime = t; doc_list[idx].mtime = t;
g_free(basename);
g_free(buff); g_free(buff);
return FALSE; return FALSE;
} }
@ -2163,4 +2165,3 @@ void utils_beep(void)
{ {
if (app->beep_on_errors) gdk_beep(); if (app->beep_on_errors) gdk_beep();
} }