From e2d73cfe3851537e5959f0cb8b18ee3076538b3d Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 15 Jan 2015 02:31:38 +0000 Subject: [PATCH] file not found is not an error in exists() --- src/file.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/file.cpp b/src/file.cpp index ce81edc54..c424b726c 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -869,7 +869,12 @@ namespace libtorrent { file_status s; stat_file(f, &s, ec); - if (ec) return false; + if (ec) + { + if (ec == boost::system::errc::no_such_file_or_directory) + ec.clear(); + return false; + } return true; }