* dir.c (handle_dirent): Don't process ".." entries.
(handle_path): Likewise. From Andrew V. Samoilov <kai@cmail.ru>
Этот коммит содержится в:
родитель
8d519dc4cc
Коммит
96632fcff1
@ -1,3 +1,9 @@
|
||||
2002-06-20 Pavel Roskin <proski@gnu.org>
|
||||
|
||||
* dir.c (handle_dirent): Don't process ".." entries.
|
||||
(handle_path): Likewise.
|
||||
From Andrew V. Samoilov <kai@cmail.ru>
|
||||
|
||||
2002-06-13 Oskar Liljeblad <oskar@osk.mine.nu>
|
||||
|
||||
* slint.c (has_colors): Don't reset SLtt_Use_Ansi_Colors to 0 if
|
||||
|
11
src/dir.c
11
src/dir.c
@ -378,13 +378,10 @@ handle_dirent (dir_list *list, char *filter, struct dirent *dp,
|
||||
{
|
||||
if (dp->d_name [0] == '.' && dp->d_name [1] == 0)
|
||||
return 0;
|
||||
if (!show_dot_files){
|
||||
if (dp->d_name [0] == '.'){
|
||||
if (!(dp->d_name [1] == 0))
|
||||
if (!(dp->d_name [1] == '.' && NLENGTH (dp) == 2))
|
||||
if (dp->d_name [0] == '.' && dp->d_name [1] == '.' && dp->d_name [2] == 0)
|
||||
return 0;
|
||||
if (!show_dot_files && (dp->d_name [0] == '.'))
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
if (!show_backups && dp->d_name [NLENGTH (dp)-1] == '~')
|
||||
return 0;
|
||||
if (mc_lstat (dp->d_name, buf1) == -1) {
|
||||
@ -432,6 +429,8 @@ handle_path (dir_list *list, char *path,
|
||||
{
|
||||
if (path [0] == '.' && path [1] == 0)
|
||||
return 0;
|
||||
if (path [0] == '.' && path [1] == '.' && path [2] == 0)
|
||||
return 0;
|
||||
if (mc_lstat (path, buf1) == -1)
|
||||
return 0;
|
||||
|
||||
|
Загрузка…
Ссылка в новой задаче
Block a user