Skip to content

Commit 47e2cbf

Browse files
committed
chore(ls): document and rename PathData::synthetic
It is now PathData::is_dot_dir, which is more descriptive.
1 parent 7ad27f7 commit 47e2cbf

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/uu/ls/src/ls.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -810,7 +810,8 @@ struct PathData<'a> {
810810
p_buf: Cow<'a, Path>,
811811
must_dereference: bool,
812812
command_line: bool,
813-
synthetic: bool,
813+
// True if it is one of the two dot dirs: `.` and `..`.
814+
is_dot_dir: bool,
814815
}
815816

816817
impl<'a> PathData<'a> {
@@ -887,7 +888,7 @@ impl<'a> PathData<'a> {
887888
p_buf,
888889
must_dereference,
889890
command_line,
890-
synthetic,
891+
is_dot_dir: synthetic,
891892
}
892893
}
893894

@@ -1325,7 +1326,7 @@ fn depth_first_list(
13251326
if config.recursive {
13261327
for e in buf
13271328
.into_iter()
1328-
.filter(|p| p.file_type().is_some_and(FileType::is_dir) && !p.synthetic)
1329+
.filter(|p| p.file_type().is_some_and(FileType::is_dir) && !p.is_dot_dir)
13291330
.rev()
13301331
{
13311332
// Try to open only to report any errors in order to match GNU semantics.

0 commit comments

Comments
 (0)