made trunk build on windows (mapped storage doesn't work right yet though)
This commit is contained in:
parent
616a48b591
commit
b5dedccb70
|
@ -210,7 +210,12 @@ namespace libtorrent
|
||||||
{
|
{
|
||||||
if (is_directory(st)) return file_view();
|
if (is_directory(st)) return file_view();
|
||||||
size_type s = fs::file_size(p);
|
size_type s = fs::file_size(p);
|
||||||
|
#ifdef WIN32
|
||||||
|
// TODO: SetFileSize()
|
||||||
|
if (s < file_size) {}
|
||||||
|
#else
|
||||||
if (s < file_size) truncate(p.string().c_str(), file_size);
|
if (s < file_size) truncate(p.string().c_str(), file_size);
|
||||||
|
#endif
|
||||||
ret = m_files.back().open(p, mode, start, view_size, key);
|
ret = m_files.back().open(p, mode, start, view_size, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1116,7 +1116,7 @@ namespace detail
|
||||||
#ifndef NDEBUG
|
#ifndef NDEBUG
|
||||||
std::string err = exc.what();
|
std::string err = exc.what();
|
||||||
#endif
|
#endif
|
||||||
}
|
};
|
||||||
|
|
||||||
/*
|
/*
|
||||||
namespace
|
namespace
|
||||||
|
|
Loading…
Reference in New Issue