diff --git a/Common/File/DiskFree.h b/Common/File/DiskFree.h index a5a5fb3c68..97cc8b652b 100644 --- a/Common/File/DiskFree.h +++ b/Common/File/DiskFree.h @@ -5,5 +5,6 @@ #include "Common/File/Path.h" // If this fails, false is returned and space is negative. -// Try to avoid calling this from the main thread, if possible. Can be SLOW. +// Try to avoid calling this from the main thread, if possible. Not super fast, +// but is also not allowed to do things like scan the entire disk. bool free_disk_space(const Path &path, int64_t &space); diff --git a/Core/FileSystems/MetaFileSystem.cpp b/Core/FileSystems/MetaFileSystem.cpp index 1ab0e2cb94..03e211392e 100644 --- a/Core/FileSystems/MetaFileSystem.cpp +++ b/Core/FileSystems/MetaFileSystem.cpp @@ -682,3 +682,9 @@ int64_t MetaFileSystem::ComputeRecursiveDirectorySize(const std::string &filenam return false; } } + +bool MetaFileSystem::ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) { + // Shouldn't be called. Can't recurse MetaFileSystem. + _dbg_assert_(false); + return false; +} diff --git a/Core/FileSystems/MetaFileSystem.h b/Core/FileSystems/MetaFileSystem.h index 3736e91204..41390e8ac2 100644 --- a/Core/FileSystems/MetaFileSystem.h +++ b/Core/FileSystems/MetaFileSystem.h @@ -144,16 +144,7 @@ public: int64_t ComputeRecursiveDirectorySize(const std::string &dirPath); - // Shouldn't ever be called, but meh. - bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override { - int64_t sizeTemp = ComputeRecursiveDirectorySize(path); - if (sizeTemp >= 0) { - *size = sizeTemp; - return true; - } else { - return false; - } - } + bool ComputeRecursiveDirSizeIfFast(const std::string &path, int64_t *size) override; void Describe(char *buf, size_t size) const override { snprintf(buf, size, "Meta"); }