Skip to content
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