summaryrefslogtreecommitdiff
path: root/community-testing/smc/boost_filesystem3.diff
diff options
context:
space:
mode:
Diffstat (limited to 'community-testing/smc/boost_filesystem3.diff')
-rw-r--r--community-testing/smc/boost_filesystem3.diff48
1 files changed, 48 insertions, 0 deletions
diff --git a/community-testing/smc/boost_filesystem3.diff b/community-testing/smc/boost_filesystem3.diff
new file mode 100644
index 000000000..6786b98f5
--- /dev/null
+++ b/community-testing/smc/boost_filesystem3.diff
@@ -0,0 +1,48 @@
+diff -rup smc-1.9/src/core/filesystem/filesystem.cpp smc-1.9.new/src/core/filesystem/filesystem.cpp
+--- smc-1.9/src/core/filesystem/filesystem.cpp 2009-07-04 12:11:18.000000000 +0200
++++ smc-1.9.new/src/core/filesystem/filesystem.cpp 2012-07-12 15:36:31.361941069 +0200
+@@ -142,27 +142,27 @@ vector<std::string> Get_Directory_Files(
+ if( fs::is_directory( *dir_itr ) )
+ {
+ // ignore hidden directories
+- if( dir_itr->path().leaf().find( "." ) == 0 )
++ if( dir_itr->path().filename().string().find( "." ) == 0 )
+ {
+ continue;
+ }
+
+ if( with_directories )
+ {
+- valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
++ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() );
+ }
+
+ // load all items from the sub-directory
+ if( search_in_sub_directories )
+ {
+- vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().leaf(), file_type, with_directories );
++ vector<std::string> new_valid_files = Get_Directory_Files( dir + "/" + dir_itr->path().filename().string(), file_type, with_directories );
+ valid_files.insert( valid_files.end(), new_valid_files.begin(), new_valid_files.end() );
+ }
+ }
+ // valid file
+- else if( file_type.empty() || dir_itr->path().leaf().rfind( file_type ) != std::string::npos )
++ else if( file_type.empty() || dir_itr->path().filename().string().rfind( file_type ) != std::string::npos )
+ {
+- valid_files.push_back( dir + "/" + dir_itr->path().leaf() );
++ valid_files.push_back( dir + "/" + dir_itr->path().filename().string() );
+ }
+ }
+ catch( const std::exception &ex )
+diff -rup smc-1.9/src/overworld/world_manager.cpp smc-1.9.new/src/overworld/world_manager.cpp
+--- smc-1.9/src/overworld/world_manager.cpp 2009-08-16 18:44:52.000000000 +0200
++++ smc-1.9.new/src/overworld/world_manager.cpp 2012-07-12 15:37:13.564660591 +0200
+@@ -118,7 +118,7 @@ void cOverworld_Manager :: Load_Dir( con
+ {
+ try
+ {
+- std::string current_dir = dir_itr->path().leaf();
++ std::string current_dir = dir_itr->path().filename().string();
+
+ // only directories with an existing description
+ if( fs::is_directory( *dir_itr ) && File_Exists( dir + "/" + current_dir + "/description.xml" ) )