Petr Gajdos 2023-07-18 11:07:47 +00:00 committed by Git OBS Bridge
parent f26e8c3135
commit 60789d796a

View File

@ -1,8 +1,8 @@
Index: doxygen-1.9.6/filesystem/filesystem.hpp
Index: doxygen-1.9.7/deps/filesystem/filesystem.hpp
===================================================================
--- doxygen-1.9.6.orig/filesystem/filesystem.hpp
+++ doxygen-1.9.6/filesystem/filesystem.hpp
@@ -5548,12 +5548,13 @@ public:
--- doxygen-1.9.7.orig/deps/filesystem/filesystem.hpp
+++ doxygen-1.9.7/deps/filesystem/filesystem.hpp
@@ -5700,12 +5700,13 @@ public:
impl(const path& path, directory_options options)
: _base(path)
, _options(options)
@ -12,14 +12,14 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
, _entry(nullptr)
{
if (!path.empty()) {
- _dir = ::opendir(path.native().c_str());
- do { _dir = ::opendir(path.native().c_str()); } while(errno == EINTR);
- if (!_dir) {
+ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort);
+ if (_namelistn == -1) {
auto error = errno;
_base = filesystem::path();
if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
@@ -5568,19 +5569,23 @@ public:
@@ -5720,19 +5721,23 @@ public:
impl(const impl& other) = delete;
~impl()
{
@ -27,7 +27,7 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
- ::closedir(_dir);
+ if (_namelist) {
+ for (int i=_namelistn-1; i>=0; i--) {
+ free(_namelist[i]);
+ free(_namelist[i]);
+ }
+ free(_namelist);
+ _namelist = nullptr;
@ -41,14 +41,14 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
do {
skip = false;
errno = 0;
- _entry = ::readdir(_dir);
- do { _entry = ::readdir(_dir); } while(errno == EINTR);
- if (_entry) {
+ if (_namelisti > 0 ) {
+ _entry = _namelist[--_namelisti];
_dir_entry._path = _base;
_dir_entry._path.append_name(_entry->d_name);
copyToDirEntry();
@@ -5590,8 +5595,11 @@ public:
@@ -5742,8 +5747,11 @@ public:
}
}
else {
@ -60,9 +60,9 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
+ free(_namelist);
+ _namelist = nullptr;
_dir_entry._path.clear();
if (errno) {
if (errno && errno != EINTR) {
ec = detail::make_system_error();
@@ -5634,7 +5642,9 @@ public:
@@ -5772,7 +5780,9 @@ public:
}
path _base;
directory_options _options;