We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 43caa75 + 0bd91b5 commit a39da77Copy full SHA for a39da77
src/util/file_util.cpp
@@ -41,6 +41,8 @@ Date: January 2012
41
#define chdir _chdir
42
#define popen _popen
43
#define pclose _pclose
44
+#else
45
+#include <cstring>
46
#endif
47
48
#ifdef USE_BOOST
@@ -135,6 +137,9 @@ void delete_directory(const std::string &path)
135
137
struct dirent *ent;
136
138
while((ent=readdir(dir))!=NULL)
139
{
140
+ // Needed for Alpine Linux
141
+ if(strcmp(ent->d_name, ".")==0 || strcmp(ent->d_name, "..")==0)
142
+ continue;
143
std::string sub_path=path+"/"+ent->d_name;
144
if(ent->d_type==DT_DIR)
145
delete_directory(sub_path);
0 commit comments