mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 22:07:34 +00:00
Shell: Use SkipParentAndBaseDir flag in DirIterator
This commit is contained in:
parent
6764b77788
commit
20d9c431ce
1 changed files with 1 additions and 5 deletions
|
@ -574,7 +574,7 @@ static Vector<String> expand_globs(const StringView& path, const StringView& bas
|
||||||
StringView new_base_v = new_base;
|
StringView new_base_v = new_base;
|
||||||
if (new_base_v.is_empty())
|
if (new_base_v.is_empty())
|
||||||
new_base_v = ".";
|
new_base_v = ".";
|
||||||
Core::DirIterator di(new_base_v, Core::DirIterator::NoFlags);
|
Core::DirIterator di(new_base_v, Core::DirIterator::SkipParentAndBaseDir);
|
||||||
|
|
||||||
if (di.has_error()) {
|
if (di.has_error()) {
|
||||||
return res;
|
return res;
|
||||||
|
@ -587,10 +587,6 @@ static Vector<String> expand_globs(const StringView& path, const StringView& bas
|
||||||
if (name[0] == '.' && part[0] != '.')
|
if (name[0] == '.' && part[0] != '.')
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// And even if they are, skip . and ..
|
|
||||||
if (name == "." || name == "..")
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (name.matches(part, String::CaseSensitivity::CaseSensitive)) {
|
if (name.matches(part, String::CaseSensitivity::CaseSensitive)) {
|
||||||
|
|
||||||
StringBuilder nested_base;
|
StringBuilder nested_base;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue