From cdc5a69a108654ff378839e8cf93669de31ff9c5 Mon Sep 17 00:00:00 2001 From: Stijn Buys Date: Sat, 2 Feb 2008 13:23:00 +0000 Subject: removed libcommon modularized client and server --- src/filesystem/Makefile.am | 3 +-- src/filesystem/file.cc | 2 +- src/filesystem/filesystem.cc | 2 +- src/filesystem/path.cc | 18 ++++-------------- 4 files changed, 7 insertions(+), 18 deletions(-) (limited to 'src/filesystem') diff --git a/src/filesystem/Makefile.am b/src/filesystem/Makefile.am index 2eb094f..a490cd3 100644 --- a/src/filesystem/Makefile.am +++ b/src/filesystem/Makefile.am @@ -2,8 +2,7 @@ METASOURCES = AUTO libfilesystem_la_SOURCES = file.cc filesystem.cc inifile.cc path.cc libfilesystem_la_LDFLAGS = -avoid-version -no-undefined -libfilesystem_la_LIBADD = $(top_builddir)/src/sys/libsys.la \ - $(top_builddir)/src/common/libcommon.la +libfilesystem_la_LIBADD = $(top_builddir)/src/sys/libsys.la noinst_LTLIBRARIES = libfilesystem.la noinst_HEADERS = file.h filesystem.h inifile.h path.h diff --git a/src/filesystem/file.cc b/src/filesystem/file.cc index 4e68bbd..cd6ae1b 100644 --- a/src/filesystem/file.cc +++ b/src/filesystem/file.cc @@ -5,7 +5,7 @@ */ // project headers -#include "common/common.h" +#include "sys/sys.h" #include "filesystem/filesystem.h" namespace filesystem { diff --git a/src/filesystem/filesystem.cc b/src/filesystem/filesystem.cc index 5ae4da7..b720198 100644 --- a/src/filesystem/filesystem.cc +++ b/src/filesystem/filesystem.cc @@ -6,7 +6,7 @@ // project headers #include "filesystem/filesystem.h" -#include "common/common.h" +#include "sys/sys.h" std::string filesystem::datadir = ""; std::string filesystem::homedir = ""; 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 -#else -#include -#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) { -- cgit v1.2.3