Project::OSiRiON - Git repositories
Project::OSiRiON
News . About . Screenshots . Downloads . Forum . Wiki . Tracker . Git
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStijn Buys <ingar@osirion.org>2008-02-02 13:23:00 +0000
committerStijn Buys <ingar@osirion.org>2008-02-02 13:23:00 +0000
commitcdc5a69a108654ff378839e8cf93669de31ff9c5 (patch)
tree10bdc47d0d51485f49387bee3aeae7037c47df6e /src/filesystem/path.cc
parent1765b93250ac3b89947c3da7f0c7266a910367c9 (diff)
removed libcommon
modularized client and server
Diffstat (limited to 'src/filesystem/path.cc')
-rw-r--r--src/filesystem/path.cc18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/filesystem/path.cc b/src/filesystem/path.cc
index ac780c4..c090791 100644
--- a/src/filesystem/path.cc
+++ b/src/filesystem/path.cc
@@ -6,13 +6,7 @@
// project headers
#include "filesystem/path.h"
-#include "common/common.h"
-
-#ifdef _WIN32
-#include <dlfcn.h>
-#else
-#include <sys/stat.h>
-#endif
+#include "sys/sys.h"
namespace filesystem {
@@ -21,14 +15,10 @@ void Path::create(std::string path) {
if (tmp[tmp.size()-1] == '/')
tmp = tmp.substr(0, tmp.size() - 1);
-#ifdef _WIN32
- mkdir(tmp.c_str());
-#else
- if (!mkdir(tmp.c_str(), 0777))
- con_warn << "Could not create directory " << tmp << std::endl;
+ if (!sys::mkdir(tmp.c_str()))
+ con_warn << "could not create directory " << tmp << std::endl;
else
- con_debug << "Path created " << tmp << std::endl;
-#endif
+ con_debug << "directory created " << tmp << std::endl;
}
bool Path::exists(std::string path) {