Skip to content

Commit a39da77

Browse files
Merge pull request diffblue#673 from NathanJPhillips/security-scanner-support
Merge branch 'master' into security-scanner-support
2 parents 43caa75 + 0bd91b5 commit a39da77

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/util/file_util.cpp

+5
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,8 @@ Date: January 2012
4141
#define chdir _chdir
4242
#define popen _popen
4343
#define pclose _pclose
44+
#else
45+
#include <cstring>
4446
#endif
4547

4648
#ifdef USE_BOOST
@@ -135,6 +137,9 @@ void delete_directory(const std::string &path)
135137
struct dirent *ent;
136138
while((ent=readdir(dir))!=NULL)
137139
{
140+
// Needed for Alpine Linux
141+
if(strcmp(ent->d_name, ".")==0 || strcmp(ent->d_name, "..")==0)
142+
continue;
138143
std::string sub_path=path+"/"+ent->d_name;
139144
if(ent->d_type==DT_DIR)
140145
delete_directory(sub_path);

0 commit comments

Comments
 (0)