avoid exceptions from boost.filesystem
This commit is contained in:
@@ -375,10 +375,10 @@ namespace libtorrent
|
|||||||
#else
|
#else
|
||||||
fs::path f = p / i->path;
|
fs::path f = p / i->path;
|
||||||
#endif
|
#endif
|
||||||
|
// TODO: Optimize this! This will result in 3 stat calls per file!
|
||||||
|
if (exists(f))
|
||||||
#ifndef BOOST_NO_EXCEPTIONS
|
#ifndef BOOST_NO_EXCEPTIONS
|
||||||
try
|
try
|
||||||
#else
|
|
||||||
if (exists(f))
|
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
size = file_size(f);
|
size = file_size(f);
|
||||||
|
Reference in New Issue
Block a user