diff --git a/src/api/plugin.cpp b/src/api/plugin.cpp index 8e66f27d..f75447da 100644 --- a/src/api/plugin.cpp +++ b/src/api/plugin.cpp @@ -417,13 +417,6 @@ bool Plugin::IsValid(const GameType gameType, return false; } -uintmax_t Plugin::GetFileSize(std::filesystem::path pluginPath) { - if (!std::filesystem::exists(pluginPath)) - pluginPath += GHOST_FILE_EXTENSION; - - return std::filesystem::file_size(pluginPath); -} - void Plugin::Load(const std::filesystem::path& path, GameType gameType, bool headerOnly) { diff --git a/src/api/plugin.h b/src/api/plugin.h index cbe2c743..f35c46b8 100644 --- a/src/api/plugin.h +++ b/src/api/plugin.h @@ -88,7 +88,6 @@ public: // Validity checks. static bool IsValid(const GameType gameType, const std::filesystem::path& pluginPath); - static uintmax_t GetFileSize(std::filesystem::path pluginPath); private: void Load(const std::filesystem::path& path, diff --git a/src/tests/api/internals/plugin_test.h b/src/tests/api/internals/plugin_test.h index 33bcc061..33f2f6ea 100644 --- a/src/tests/api/internals/plugin_test.h +++ b/src/tests/api/internals/plugin_test.h @@ -465,22 +465,6 @@ TEST_P( } } -TEST_P(PluginTest, getFileSizeShouldThrowForAMissingPlugin) { - EXPECT_THROW(Plugin::GetFileSize(game_.DataPath() / missingEsp), - std::filesystem::filesystem_error); -} - -TEST_P(PluginTest, getFileSizeShouldReturnCorrectValueForAPlugin) { - EXPECT_EQ(getNonAsciiEspFileSize(), - Plugin::GetFileSize(game_.DataPath() / - std::filesystem::u8path(nonAsciiEsp))); -} - -TEST_P(PluginTest, getFileSizeShouldReturnCorrectValueForAGhostedPlugin) { - EXPECT_EQ(getGhostedPluginFileSize(), - Plugin::GetFileSize(game_.DataPath() / blankMasterDependentEsm)); -} - TEST_P(PluginTest, doRecordsOverlapShouldReturnFalseIfTheArgumentIsNotAPluginObject) { Plugin plugin1(