diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-23 04:13:09 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2014-01-23 04:13:46 +0400 |
commit | 4b820fb673319989026433f284e11671885757c0 (patch) | |
tree | d011584f809d01ca5fb90b7e50ad4f64b15c2dad /intern/cycles/util/util_cache.cpp | |
parent | 282ad434a8bca760372f98ceec8a15725bf30bd1 (diff) |
Fix T38311: cycles BVH cache crash on Windows.
Diffstat (limited to 'intern/cycles/util/util_cache.cpp')
-rw-r--r-- | intern/cycles/util/util_cache.cpp | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/intern/cycles/util/util_cache.cpp b/intern/cycles/util/util_cache.cpp index f1c9dcd79ab..e20c3a67b75 100644 --- a/intern/cycles/util/util_cache.cpp +++ b/intern/cycles/util/util_cache.cpp @@ -113,23 +113,7 @@ bool Cache::lookup(CacheData& key, CacheData& value) void Cache::clear_except(const string& name, const set<string>& except) { - string dir = path_user_get("cache"); - - if(boost::filesystem::exists(dir)) { - boost::filesystem::directory_iterator it(dir), it_end; - - for(; it != it_end; it++) { -#if (BOOST_FILESYSTEM_VERSION == 2) - string filename = it->path().filename(); -#else - string filename = it->path().filename().string(); -#endif - - if(boost::starts_with(filename, name)) - if(except.find(filename) == except.end()) - boost::filesystem::remove(it->path()); - } - } + path_cache_clear_except(name, except); } CCL_NAMESPACE_END |