forked from pool/doxygen
This commit is contained in:
parent
f26e8c3135
commit
60789d796a
@ -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.7.orig/deps/filesystem/filesystem.hpp
|
||||||
+++ doxygen-1.9.6/filesystem/filesystem.hpp
|
+++ doxygen-1.9.7/deps/filesystem/filesystem.hpp
|
||||||
@@ -5548,12 +5548,13 @@ public:
|
@@ -5700,12 +5700,13 @@ public:
|
||||||
impl(const path& path, directory_options options)
|
impl(const path& path, directory_options options)
|
||||||
: _base(path)
|
: _base(path)
|
||||||
, _options(options)
|
, _options(options)
|
||||||
@ -12,14 +12,14 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
|
|||||||
, _entry(nullptr)
|
, _entry(nullptr)
|
||||||
{
|
{
|
||||||
if (!path.empty()) {
|
if (!path.empty()) {
|
||||||
- _dir = ::opendir(path.native().c_str());
|
- do { _dir = ::opendir(path.native().c_str()); } while(errno == EINTR);
|
||||||
- if (!_dir) {
|
- if (!_dir) {
|
||||||
+ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort);
|
+ _namelisti = _namelistn = ::scandir(path.native().c_str(), &_namelist, NULL, alphasort);
|
||||||
+ if (_namelistn == -1) {
|
+ if (_namelistn == -1) {
|
||||||
auto error = errno;
|
auto error = errno;
|
||||||
_base = filesystem::path();
|
_base = filesystem::path();
|
||||||
if ((error != EACCES && error != EPERM) || (options & directory_options::skip_permission_denied) == directory_options::none) {
|
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(const impl& other) = delete;
|
||||||
~impl()
|
~impl()
|
||||||
{
|
{
|
||||||
@ -27,7 +27,7 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
|
|||||||
- ::closedir(_dir);
|
- ::closedir(_dir);
|
||||||
+ if (_namelist) {
|
+ if (_namelist) {
|
||||||
+ for (int i=_namelistn-1; i>=0; i--) {
|
+ for (int i=_namelistn-1; i>=0; i--) {
|
||||||
+ free(_namelist[i]);
|
+ free(_namelist[i]);
|
||||||
+ }
|
+ }
|
||||||
+ free(_namelist);
|
+ free(_namelist);
|
||||||
+ _namelist = nullptr;
|
+ _namelist = nullptr;
|
||||||
@ -41,14 +41,14 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
|
|||||||
do {
|
do {
|
||||||
skip = false;
|
skip = false;
|
||||||
errno = 0;
|
errno = 0;
|
||||||
- _entry = ::readdir(_dir);
|
- do { _entry = ::readdir(_dir); } while(errno == EINTR);
|
||||||
- if (_entry) {
|
- if (_entry) {
|
||||||
+ if (_namelisti > 0 ) {
|
+ if (_namelisti > 0 ) {
|
||||||
+ _entry = _namelist[--_namelisti];
|
+ _entry = _namelist[--_namelisti];
|
||||||
_dir_entry._path = _base;
|
_dir_entry._path = _base;
|
||||||
_dir_entry._path.append_name(_entry->d_name);
|
_dir_entry._path.append_name(_entry->d_name);
|
||||||
copyToDirEntry();
|
copyToDirEntry();
|
||||||
@@ -5590,8 +5595,11 @@ public:
|
@@ -5742,8 +5747,11 @@ public:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
@ -60,9 +60,9 @@ Index: doxygen-1.9.6/filesystem/filesystem.hpp
|
|||||||
+ free(_namelist);
|
+ free(_namelist);
|
||||||
+ _namelist = nullptr;
|
+ _namelist = nullptr;
|
||||||
_dir_entry._path.clear();
|
_dir_entry._path.clear();
|
||||||
if (errno) {
|
if (errno && errno != EINTR) {
|
||||||
ec = detail::make_system_error();
|
ec = detail::make_system_error();
|
||||||
@@ -5634,7 +5642,9 @@ public:
|
@@ -5772,7 +5780,9 @@ public:
|
||||||
}
|
}
|
||||||
path _base;
|
path _base;
|
||||||
directory_options _options;
|
directory_options _options;
|
||||||
|
Loading…
Reference in New Issue
Block a user