From 3c3aaaccb024ab12366d537a6d467b06d4c7a0de Mon Sep 17 00:00:00 2001 From: Ansariel Date: Fri, 11 Jun 2021 22:58:42 +0200 Subject: [PATCH] Simple Cache Viewer: boost::filesystem::recursive_directory_iterator uses throw-behavior by default as well... --- indra/llfilesystem/lldiskcache.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/indra/llfilesystem/lldiskcache.cpp b/indra/llfilesystem/lldiskcache.cpp index aee3670fda..6e77de2735 100644 --- a/indra/llfilesystem/lldiskcache.cpp +++ b/indra/llfilesystem/lldiskcache.cpp @@ -85,8 +85,8 @@ void LLDiskCache::purge() if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed()) { // Optimize asset simple disk cache - //for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path), {})) - for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(cache_path), {})) + //for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {})) + for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(cache_path, ec), {})) { if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) { @@ -338,8 +338,8 @@ void LLDiskCache::clearCache() if (boost::filesystem::is_directory(cache_path, ec) && !ec.failed()) { // Optimize asset simple disk cache - //for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(cache_path), {})) - for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path), {})) + //for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(cache_path, ec), {})) + for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(cache_path, ec), {})) { if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) { @@ -381,8 +381,8 @@ uintmax_t LLDiskCache::dirFileSize(const std::string dir) if (boost::filesystem::is_directory(dir_path, ec) && !ec.failed()) { // Optimize asset simple disk cache - //for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(dir_path), {})) - for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(dir_path), {})) + //for (auto& entry : boost::make_iterator_range(boost::filesystem::directory_iterator(dir_path, ec), {})) + for (auto& entry : boost::make_iterator_range(boost::filesystem::recursive_directory_iterator(dir_path, ec), {})) { if (boost::filesystem::is_regular_file(entry, ec) && !ec.failed()) {