mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
f8bc7c4f59 | |||
9e48274617 |
@ -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)
|
||||
|
@ -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)
|
||||
|
@ -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");
|
||||
|
Reference in New Issue
Block a user