From ced0f74bf8f2614974252107e9258831092b90a6 Mon Sep 17 00:00:00 2001 From: arvidn Date: Fri, 6 Nov 2015 00:38:42 -0500 Subject: [PATCH] minor moving around of code --- .travis.yml | 2 +- src/storage.cpp | 24 ++++++++++++------------ 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5f5c06eae..bfa08a501 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,7 +38,7 @@ addons: - g++-4.8 before_install: - - git submodule update --init --recursive --depth=1 + - git submodule update --init --recursive - if [ $TRAVIS_OS_NAME == "osx" ]; then brew update > /dev/null && brew install --quiet ccache boost-build boost-python; fi # disable simulations on OSX for now. It hangs on travis diff --git a/src/storage.cpp b/src/storage.cpp index 84742390f..441dfbacc 100644 --- a/src/storage.cpp +++ b/src/storage.cpp @@ -701,20 +701,17 @@ namespace libtorrent file_size = s.file_size; file_time = s.mtime; } + else if (error == error_code(boost::system::errc::no_such_file_or_directory + , generic_category())) + { + m_stat_cache.set_noexist(i); + } else { - if (error == error_code(boost::system::errc::no_such_file_or_directory - , generic_category())) - { - m_stat_cache.set_noexist(i); - } - else - { - ec.ec = error; - ec.file = i; - ec.operation = storage_error::stat; - m_stat_cache.set_error(i); - } + ec.ec = error; + ec.file = i; + ec.operation = storage_error::stat; + m_stat_cache.set_error(i); } } @@ -924,6 +921,9 @@ namespace libtorrent } } + // TODO: 2 we probably need to do this unconditionally in this function. + // Even if the resume data file appears stale, we need to create these + // hard links, right? #ifndef TORRENT_DISABLE_MUTABLE_TORRENTS if (links) {