teach find_root_device to deal with /dev/ subdirs
(by "Kirill K. Smirnov" <lich@math.spbu.ru>)
This commit is contained in:
@@ -504,11 +504,11 @@ static struct dnode **list_dir(const char *path)
|
||||
|
||||
/* are we going to list the file- it may be . or .. or a hidden file */
|
||||
if (entry->d_name[0] == '.') {
|
||||
if ((entry->d_name[1] == 0 || (
|
||||
entry->d_name[1] == '.'
|
||||
&& entry->d_name[2] == 0))
|
||||
&& !(all_fmt & DISP_DOT))
|
||||
if ((!entry->d_name[1] || (entry->d_name[1] == '.' && !entry->d_name[2]))
|
||||
&& !(all_fmt & DISP_DOT)
|
||||
) {
|
||||
continue;
|
||||
}
|
||||
if (!(all_fmt & DISP_HIDDEN))
|
||||
continue;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user