From 40946162b3c99ecaabeabc6a1ff16269fd8d4558 Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Fri, 14 Nov 2008 21:35:21 +0000 Subject: [PATCH] avoid exceptions from boost.filesystem --- src/storage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/storage.cpp b/src/storage.cpp index ae334a389..6e5a92468 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -375,10 +375,10 @@ namespace libtorrent #else fs::path f = p / i->path; #endif + // TODO: Optimize this! This will result in 3 stat calls per file! + if (exists(f)) #ifndef BOOST_NO_EXCEPTIONS try -#else - if (exists(f)) #endif { size = file_size(f);