Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Untag dispatch _Directory_iterator #2478

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
22 changes: 11 additions & 11 deletions stl/inc/experimental/filesystem
Expand Up @@ -1468,7 +1468,7 @@ public:

*_Mypdir = _Open_dir(_Dest, _Path.c_str(), _Errno, _Ftype);
if (*_Mypdir) {
_Form_name(_Dest, _Ftype, _Prefix_directory());
_Form_name(_Dest, _Ftype);
}
}

Expand All @@ -1480,7 +1480,7 @@ public:

*_Mypdir = _Open_dir(_Dest, _Path.c_str(), _Errno, _Ftype);
if (*_Mypdir) {
_Form_name(_Dest, _Ftype, _Prefix_directory());
_Form_name(_Dest, _Ftype);
}

_Code = error_code(_Errno, _STD system_category());
Expand Down Expand Up @@ -1555,19 +1555,19 @@ private:
_Close_dir(*_Mypdir);
*_Mypdir = nullptr; // end of directory
} else {
_Form_name(_Dest, _Ftype, _Prefix_directory());
_Form_name(_Dest, _Ftype);
}
}
}

void _Form_name(typename string_type::value_type* _Filename, file_type _Ftype,
true_type) { // set entry to _Mydirpath/_Filename
_Myentry.assign(_Mydirpath / path(_Filename), file_status(_Ftype));
}

void _Form_name(typename string_type::value_type* _Filename, file_type _Ftype,
false_type) { // set entry to _Filename
_Myentry.assign(path(_Filename), file_status(_Ftype));
void _Form_name(typename string_type::value_type* _Filename, file_type _Ftype) {
if constexpr (_Prefix_directory::value) {
// set entry to _Mydirpath/_Filename
_Myentry.assign(_Mydirpath / path(_Filename), file_status(_Ftype));
} else {
// set entry to _Filename
_Myentry.assign(path(_Filename), file_status(_Ftype));
}
}

shared_ptr<void*> _Mypdir;
Expand Down