\r
#include <boost/algorithm/string.hpp>\r
#include <boost/assert.hpp>\r
+--- vcmi-0.89/lib/CLodHandler.cpp~ 2012-05-25 13:49:56.000000000 +0200
++++ vcmi-0.89/lib/CLodHandler.cpp 2012-07-11 13:58:30.506510264 +0200
+@@ -284,7 +284,7 @@
+ if (boost::filesystem::is_directory(dir->status()))\r
+ {\r
+ path.resize(dir.level()+1);\r
+- path.back() = dir->path().leaf();\r
++ path.back() = dir->path().filename().string();\r
+ }\r
+ if(boost::filesystem::is_regular(dir->status()))\r
+ {\r
+@@ -294,7 +294,7 @@
+ for (size_t i=0; i<dir.level() && i<path.size(); i++)\r
+ e.realName += path[i] + '/';\r
+ \r
+- e.realName += dir->path().leaf();\r
++ e.realName += dir->path().filename().string();\r
+ \r
+ initEntry(e, e.realName);\r
+ \r
+--- vcmi-0.89/client/CPlayerInterface.cpp~ 2012-05-20 00:57:24.000000000 +0200
++++ vcmi-0.89/client/CPlayerInterface.cpp 2012-07-11 14:01:17.689846035 +0200
+@@ -1567,7 +1567,7 @@
+ {\r
+ if(is_regular(dir->status()))\r
+ {\r
+- std::string name = dir->path().leaf();\r
++ std::string name = dir->path().filename().string();\r
+ if(starts_with(name, namePrefix) && ends_with(name, ".vlgm1"))\r
+ {\r
+ char nr = name[namePrefix.size()];\r
+--- vcmi-0.89/Scripting/ERM/ERMInterpreter.cpp~ 2012-02-16 18:10:58.000000000 +0100
++++ vcmi-0.89/Scripting/ERM/ERMInterpreter.cpp 2012-07-11 14:04:08.642118903 +0200
+@@ -376,7 +376,7 @@
+ {\r
+ if(is_regular(dir->status()))\r
+ {\r
+- std::string name = dir->path().leaf();\r
++ std::string name = dir->path().filename().string();\r
+ if( boost::algorithm::ends_with(name, ".erm") ||\r
+ boost::algorithm::ends_with(name, ".verm") )\r
+ {\r