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 6edd2b3 + 57fd36c commit 230c8c5Copy full SHA for 230c8c5
src/util/file_util.cpp
@@ -30,6 +30,8 @@ Date: January 2012
30
#define chdir _chdir
31
#define popen _popen
32
#define pclose _pclose
33
+#else
34
+#include <cstring>
35
#endif
36
37
#include "file_util.h"
@@ -119,6 +121,9 @@ void delete_directory(const std::string &path)
119
121
struct dirent *ent;
120
122
while((ent=readdir(dir))!=NULL)
123
{
124
+ // Needed for Alpine Linux
125
+ if(strcmp(ent->d_name, ".")==0 || strcmp(ent->d_name, "..")==0)
126
+ continue;
127
std::string sub_path=path+"/"+ent->d_name;
128
if(ent->d_type==DT_DIR)
129
delete_directory(sub_path);
0 commit comments