mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-06-28 05:49:35 +00:00
+ port makeDirectory to WIN32
This commit is contained in:
@ -105,7 +105,11 @@ bool fileExists(const string &path) {
|
||||
}
|
||||
|
||||
bool makeDirectory(const string &path) {
|
||||
#ifdef _WIN32
|
||||
int status = _mkdir(path.c_str());
|
||||
#else
|
||||
int status = mkdir(path.c_str(), S_IRWXU | S_IRWXG | S_IROTH | S_IXOTH);
|
||||
#endif
|
||||
return status == 0;
|
||||
}
|
||||
|
||||
|
@ -30,6 +30,10 @@
|
||||
#include <sys/stat.h>
|
||||
#include <ios>
|
||||
|
||||
#ifdef _WIN32
|
||||
#include <direct.h>
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
bool isRelativePath(const string &path);
|
||||
|
Reference in New Issue
Block a user