mirror of
https://github.com/kiwix/libkiwix.git
synced 2025-09-22 11:45:45 -04:00
+ port makeDirectory to WIN32
This commit is contained in:
parent
8df9c53878
commit
faff227365
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user