Closed ooxi closed 12 years ago
Appended patch by e.zagorodniy@gmail.com
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a92cb27..f130fd0 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -8,7 +8,7 @@ find_package(SDL_ttf REQUIRED)
find_package(SDL_mixer REQUIRED)
find_package(OpenGL REQUIRED)
find_package(Boost COMPONENTS filesystem system REQUIRED)
-add_definitions(-DBOOST_FILESYSTEM_VERSION=2)
+add_definitions(-DBOOST_FILESYSTEM_VERSION=3)
if(${MINGW})
set(INTL_LIBRARY intl)
diff --git a/src/system/utility/FileUtility.cpp b/src/system/utility/FileUtility.cpp
index 52091b3..3f20887 100644
--- a/src/system/utility/FileUtility.cpp
+++ b/src/system/utility/FileUtility.cpp
@@ -20,7 +20,7 @@ std::vector<std::string> FileUtility::getFilesFromDir(boost::filesystem::path di
while (dir_it != boost::filesystem::directory_iterator()) {
if (boost::filesystem::is_regular_file(*dir_it))
- files.push_back(dir_it->filename());
+ files.push_back(dir_it->path().filename().string());
++dir_it;
}
return files;
@@ -32,8 +32,8 @@ std::vector<std::string> FileUtility::getSubDirsFromDir(boost::filesystem::path
while (dir_it != boost::filesystem::directory_iterator()) {
if (boost::filesystem::is_directory(*dir_it))
- if (dir_it->path().filename()[0] != '.')
- subDirs.push_back(dir_it->path().filename());
+ if (dir_it->path().filename().string()[0] != '.')
+ subDirs.push_back(dir_it->path().filename().string());
++dir_it;
}
return subDirs;
@@ -45,7 +45,7 @@ unsigned int FileUtility::getSubDirsCountFromDir(boost::filesystem::path dir) {
while (dir_it != boost::filesystem::directory_iterator()) {
if (boost::filesystem::is_directory(*dir_it))
- if (dir_it->path().filename()[0] != '.')
+ if (dir_it->path().filename().string()[0] != '.')
++count;
++dir_it;
}
Applied in 9a15a83d27f34e505a4a5414711375a8548b17dd
This is Issue 61 moved from a Google Code project. Added by 2012-10-25T14:09:51.000Z by e.zagoro...@gmail.com. Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description