1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-02-22 03:40:49 +00:00

fix opening BSA on Unicode path

This commit is contained in:
greye 2014-05-19 13:39:07 +04:00
parent 417e07fbce
commit 493f8c6050

View File

@ -25,6 +25,9 @@
#include <stdexcept> #include <stdexcept>
#include <boost/filesystem/path.hpp>
#include <boost/filesystem/fstream.hpp>
#include "../files/constrainedfiledatastream.hpp" #include "../files/constrainedfiledatastream.hpp"
using namespace std; using namespace std;
@ -72,7 +75,8 @@ void BSAFile::readHeader()
*/ */
assert(!isLoaded); assert(!isLoaded);
std::ifstream input(filename.c_str(), std::ios_base::binary); namespace bfs = boost::filesystem;
bfs::ifstream input(bfs::path(filename), std::ios_base::binary);
// Total archive size // Total archive size
size_t fsize = 0; size_t fsize = 0;