diff options
| author | Grant Limberg <glimberg@gmail.com> | 2015-04-24 16:48:48 -0700 | 
|---|---|---|
| committer | Grant Limberg <glimberg@gmail.com> | 2015-04-24 16:48:48 -0700 | 
| commit | 0f808e11df8646e82eb3e178896dc8d88f8d79d3 (patch) | |
| tree | a09e8c27911f73e65ab2ec0ef0068d143d89a72c /osdep/OSUtils.hpp | |
| parent | 1a65a79e57521a0d20d6a2c6d18ab8cf169fcd50 (diff) | |
| parent | ce09e363dc95d801e8707a29a0d585089d6c3d09 (diff) | |
| download | infinitytier-0f808e11df8646e82eb3e178896dc8d88f8d79d3.tar.gz infinitytier-0f808e11df8646e82eb3e178896dc8d88f8d79d3.zip | |
Merge branch 'adamierymenko-dev' into android-jni
Diffstat (limited to 'osdep/OSUtils.hpp')
| -rw-r--r-- | osdep/OSUtils.hpp | 7 | 
1 files changed, 7 insertions, 0 deletions
| diff --git a/osdep/OSUtils.hpp b/osdep/OSUtils.hpp index 4422ab7d..bfe9b68a 100644 --- a/osdep/OSUtils.hpp +++ b/osdep/OSUtils.hpp @@ -45,6 +45,7 @@  #ifdef __WINDOWS__  #include <WinSock2.h>  #include <Windows.h> +#include <Shlwapi.h>  #else  #include <unistd.h>  #include <errno.h> @@ -96,9 +97,15 @@ public:  	static inline bool mkdir(const char *path)  		throw()  	{ +#ifdef __WINDOWS__ +		if (::PathIsDirectoryA(path)) +			return true; +		return (::CreateDirectoryA(path,NULL) == TRUE); +#else  		if (::mkdir(path,0755) != 0)  			return (errno == EEXIST);  		return true; +#endif  	}  	static inline bool mkdir(const std::string &path) throw() { return OSUtils::mkdir(path.c_str()); } | 
