From dd9cff9abf6b1aa951da2d9be9fb278448d51d40 Mon Sep 17 00:00:00 2001 From: msheby Date: Mon, 6 Apr 2009 20:51:46 +0000 Subject: [PATCH] Do a bunch of Win32 implementation for new functions. --- src/KM_fileio.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/src/KM_fileio.cpp b/src/KM_fileio.cpp index 8625e69..d5d5a40 100644 --- a/src/KM_fileio.cpp +++ b/src/KM_fileio.cpp @@ -1342,9 +1342,6 @@ Kumu::DirScanner::GetNext(char* filename) // note: when moving to KM_fileio, don't forget to write the Win32 versions // note: add error messages and remove RESULT_FAIL form DirScanner -#ifdef KM_WIN32 -#else // KM_WIN32 - // given a path string, create any missing directories so that PathIsDirectory(Path) is true. // Result_t @@ -1364,7 +1361,11 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) if ( ! PathIsDirectory(tmp_path) ) { +#ifdef KM_WIN32 + if ( mkdir(tmp_path.c_str()) != 0 ) +#else // KM_WIN32 if ( mkdir(tmp_path.c_str(), 0775) != 0 ) +#endif // KM_WIN32 { DefaultLogSink().Error("CreateDirectoriesInPath mkdir %s: %s\n", tmp_path.c_str(), strerror(errno)); @@ -1375,12 +1376,8 @@ Kumu::CreateDirectoriesInPath(const std::string& Path) return RESULT_OK; } -#endif // KM_WIN32 -#ifdef KM_WIN32 -#else // KM_WIN32 - // Result_t Kumu::DeleteFile(const std::string& filename) @@ -1471,7 +1468,6 @@ Kumu::DeletePath(const std::string& pathname) return h__DeletePath(c_pathname); } -#endif // KM_WIN32 //------------------------------------------------------------------------------------------ // -- 2.30.2