Compare commits

..

2 Commits
5.5.0 ... 5.5.1

Author SHA1 Message Date
f8bc7c4f59 base: Update version to 5.5.1
Enhancements:
- Updated translation strings

Bug Fixes:
- Fixed a potential crash with the migration on systems set to
non-english languages
2024-06-11 15:41:13 -07:00
9e48274617 Config: Ensure conversion to filesystem::path uses utf-8 2024-06-11 13:43:10 -07:00
3 changed files with 7 additions and 6 deletions

View File

@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.16...3.25)
legacy_check()
set(obs-websocket_VERSION 5.5.0)
set(obs-websocket_VERSION 5.5.1)
set(OBS_WEBSOCKET_RPC_VERSION 1)
include(cmake/obs-websocket-api.cmake)

View File

@ -1,4 +1,4 @@
project(obs-websocket VERSION 5.5.0)
project(obs-websocket VERSION 5.5.1)
set(OBS_WEBSOCKET_RPC_VERSION 1)
option(ENABLE_WEBSOCKET "Enable building OBS with websocket plugin" ON)

View File

@ -193,7 +193,7 @@ bool MigratePersistentData()
std::error_code ec;
// Ensure module config directory exists
std::string moduleConfigDirectory = Utils::Obs::StringHelper::GetModuleConfigPath("");
auto moduleConfigDirectory = std::filesystem::u8path(Utils::Obs::StringHelper::GetModuleConfigPath(""));
if (!std::filesystem::exists(moduleConfigDirectory, ec))
std::filesystem::create_directories(moduleConfigDirectory, ec);
if (ec) {
@ -203,10 +203,11 @@ bool MigratePersistentData()
}
// Move any existing persistent data to module config directory, then delete old file
std::string oldPersistentDataPath =
Utils::Obs::StringHelper::GetCurrentProfilePath() + "/../../../obsWebSocketPersistentData.json";
auto oldPersistentDataPath = std::filesystem::u8path(Utils::Obs::StringHelper::GetCurrentProfilePath() +
"/../../../obsWebSocketPersistentData.json");
if (std::filesystem::exists(oldPersistentDataPath, ec)) {
std::string persistentDataPath = Utils::Obs::StringHelper::GetModuleConfigPath("persistent_data.json");
auto persistentDataPath =
std::filesystem::u8path(Utils::Obs::StringHelper::GetModuleConfigPath("persistent_data.json"));
std::filesystem::copy_file(oldPersistentDataPath, persistentDataPath, ec);
std::filesystem::remove(oldPersistentDataPath, ec);
blog(LOG_INFO, "[MigratePersistentData] Persistent data migrated to new path");