mirror of
https://github.com/MidnightCommander/mc
synced 2025-01-20 18:29:19 +03:00
* 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:
parent
dc41843825
commit
8729c81ddc
@ -1,5 +1,9 @@
|
|||||||
2003-09-22 Pavel Roskin <proski@gnu.org>
|
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
|
* glibcompat.c: New file for compatibility with older versions
|
||||||
of glib.
|
of glib.
|
||||||
* glibcompat.h: Likewise.
|
* glibcompat.h: Likewise.
|
||||||
|
11
src/find.c
11
src/find.c
@ -858,7 +858,8 @@ kill_gui (void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
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;
|
int return_value = 0;
|
||||||
char *dir;
|
char *dir;
|
||||||
@ -895,7 +896,8 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
|
|||||||
dir_list *list = &cpanel->dir;
|
dir_list *list = &cpanel->dir;
|
||||||
char *dir, *name;
|
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;
|
char *filename;
|
||||||
|
|
||||||
if (!entry->text || !entry->data)
|
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);
|
name = concat_dir_and_file (dir + 2, filename);
|
||||||
else
|
else
|
||||||
name = concat_dir_and_file (dir, filename);
|
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);
|
&stale_link);
|
||||||
if (status == 0) {
|
if (status == 0) {
|
||||||
g_free (name);
|
g_free (name);
|
||||||
@ -936,7 +939,7 @@ find_file (char *start_dir, char *pattern, char *content, char **dirname, char
|
|||||||
panel_clean_dir (cpanel);
|
panel_clean_dir (cpanel);
|
||||||
list->list[next_free].fnamelen = strlen (name);
|
list->list[next_free].fnamelen = strlen (name);
|
||||||
list->list[next_free].fname = 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.link_to_dir = link_to_dir;
|
||||||
list->list[next_free].f.stale_link = stale_link;
|
list->list[next_free].f.stale_link = stale_link;
|
||||||
list->list[next_free].f.dir_size_computed = 0;
|
list->list[next_free].f.dir_size_computed = 0;
|
||||||
|
@ -372,6 +372,7 @@ panel_clean_dir (WPanel *panel)
|
|||||||
panel->total = 0;
|
panel->total = 0;
|
||||||
panel->searching = 0;
|
panel->searching = 0;
|
||||||
panel->is_panelized = 0;
|
panel->is_panelized = 0;
|
||||||
|
panel->dirty = 1;
|
||||||
|
|
||||||
clean_dir (&panel->dir, count);
|
clean_dir (&panel->dir, count);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user