Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge branch 'master' into security-scanner-support #673

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/util/file_util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ Date: January 2012
#define chdir _chdir
#define popen _popen
#define pclose _pclose
#else
#include <cstring>
#endif

#ifdef USE_BOOST
Expand Down Expand Up @@ -135,6 +137,9 @@ void delete_directory(const std::string &path)
struct dirent *ent;
while((ent=readdir(dir))!=NULL)
{
// Needed for Alpine Linux
if(strcmp(ent->d_name, ".")==0 || strcmp(ent->d_name, "..")==0)
continue;
std::string sub_path=path+"/"+ent->d_name;
if(ent->d_type==DT_DIR)
delete_directory(sub_path);
Expand Down