* find.c (find_file): Don't call file_mark(), it would use

uninitialized data.
* main.c (panel_clean_dir): Make panel dirty.
This commit is contained in:
Pavel Roskin 2003-09-22 22:05:27 +00:00
parent dc41843825
commit 8729c81ddc
3 changed files with 45 additions and 37 deletions

View File

@ -1,5 +1,9 @@
2003-09-22 Pavel Roskin <proski@gnu.org>
* find.c (find_file): Don't call file_mark(), it would use
uninitialized data.
* main.c (panel_clean_dir): Make panel dirty.
* glibcompat.c: New file for compatibility with older versions
of glib.
* glibcompat.h: Likewise.

View File

@ -858,7 +858,8 @@ kill_gui (void)
}
static int
find_file (char *start_dir, char *pattern, char *content, char **dirname, char **filename)
find_file (char *start_dir, char *pattern, char *content, char **dirname,
char **filename)
{
int return_value = 0;
char *dir;
@ -895,7 +896,8 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
dir_list *list = &cpanel->dir;
char *dir, *name;
for (i = 0; entry && i < find_list->count; entry = entry->next, i++){
for (i = 0; entry && i < find_list->count;
entry = entry->next, i++) {
char *filename;
if (!entry->text || !entry->data)
@ -913,7 +915,8 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
name = concat_dir_and_file (dir + 2, filename);
else
name = concat_dir_and_file (dir, filename);
status = handle_path (list, name, &st, next_free, &link_to_dir,
status =
handle_path (list, name, &st, next_free, &link_to_dir,
&stale_link);
if (status == 0) {
g_free (name);
@ -936,7 +939,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
panel_clean_dir (cpanel);
list->list[next_free].fnamelen = strlen (name);
list->list[next_free].fname = name;
file_mark (cpanel, next_free, 0);
list->list[next_free].f.marked = 0;
list->list[next_free].f.link_to_dir = link_to_dir;
list->list[next_free].f.stale_link = stale_link;
list->list[next_free].f.dir_size_computed = 0;

View File

@ -372,6 +372,7 @@ panel_clean_dir (WPanel *panel)
panel->total = 0;
panel->searching = 0;
panel->is_panelized = 0;
panel->dirty = 1;
clean_dir (&panel->dir, count);
}