From 24d21d34070da69cede82251540bf126a5ccf6d1 Mon Sep 17 00:00:00 2001 From: Oliver Hamlet Date: Tue, 22 Aug 2023 19:04:35 +0100 Subject: [PATCH] Use correct case for Oblivion and Nehrim Plugins.txt This makes a difference when using case-sensitive filesystems, though files like plugins.txt and Skyrim.ccc/Fallout4.ccc may still contain plugin names in the wrong case. I've checked all other games (besides the VR games, which I don't own copies of) and they all use lowercase plugins.txt. I've also checked all the other hardcoded file and folder names used, and they're all correct. --- ffi/tests/ffi.c | 6 +++--- ffi/tests/ffi.cpp | 6 +++--- src/game_settings.rs | 6 +++--- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/ffi/tests/ffi.c b/ffi/tests/ffi.c index aa1b6d1..e25d39d 100644 --- a/ffi/tests/ffi.c +++ b/ffi/tests/ffi.c @@ -146,9 +146,9 @@ void test_lo_get_active_plugins_file_path() { assert(return_code == 0); #ifdef _WIN32 - assert(strcmp(path, "../../testing-plugins/Oblivion\\plugins.txt") == 0); + assert(strcmp(path, "../../testing-plugins/Oblivion\\Plugins.txt") == 0); #else - assert(strcmp(path, "../../testing-plugins/Oblivion/plugins.txt") == 0); + assert(strcmp(path, "../../testing-plugins/Oblivion/Plugins.txt") == 0); #endif lo_free_string(path); lo_destroy_handle(handle); @@ -330,7 +330,7 @@ int main(void) { test_lo_get_plugin_position(); test_lo_get_indexed_plugin(); - remove("testing-plugins/Oblivion/plugins.txt"); + remove("testing-plugins/Oblivion/Plugins.txt"); printf("SUCCESS\n"); return 0; } diff --git a/ffi/tests/ffi.cpp b/ffi/tests/ffi.cpp index e82e538..735be09 100644 --- a/ffi/tests/ffi.cpp +++ b/ffi/tests/ffi.cpp @@ -149,9 +149,9 @@ void test_lo_get_active_plugins_file_path() { assert(return_code == 0); #ifdef _WIN32 - assert(strcmp(path, "../../testing-plugins/Oblivion\\plugins.txt") == 0); + assert(strcmp(path, "../../testing-plugins/Oblivion\\Plugins.txt") == 0); #else - assert(strcmp(path, "../../testing-plugins/Oblivion/plugins.txt") == 0); + assert(strcmp(path, "../../testing-plugins/Oblivion/Plugins.txt") == 0); #endif lo_free_string(path); lo_destroy_handle(handle); @@ -357,7 +357,7 @@ int main(void) { test_thread_safety(); - remove("testing-plugins/Oblivion/plugins.txt"); + remove("testing-plugins/Oblivion/Plugins.txt"); printf("SUCCESS\n"); return 0; } diff --git a/src/game_settings.rs b/src/game_settings.rs index e2f4ac6..06b997a 100644 --- a/src/game_settings.rs +++ b/src/game_settings.rs @@ -310,7 +310,7 @@ fn oblivion_plugins_file_path(game_path: &Path, local_path: &Path) -> PathBuf { game_path }; - parent_path.join("plugins.txt") + parent_path.join("Plugins.txt") } fn use_my_games_directory(ini_path: &Path) -> bool { @@ -740,7 +740,7 @@ mod tests { ) .unwrap(); assert_eq!( - Path::new("local/plugins.txt"), + Path::new("local/Plugins.txt"), settings.active_plugins_file() ); @@ -831,7 +831,7 @@ mod tests { GameSettings::with_local_path(GameId::Oblivion, &game_path, &Path::new("local")) .unwrap(); assert_eq!( - game_path.join("plugins.txt"), + game_path.join("Plugins.txt"), *settings.active_plugins_file() ); }