@@ -193,7 +193,7 @@ bool MigratePersistentData()
193
193
std::error_code ec;
194
194
195
195
// Ensure module config directory exists
196
- std::string moduleConfigDirectory = Utils::Obs::StringHelper::GetModuleConfigPath (" " );
196
+ auto moduleConfigDirectory = std::filesystem::u8path ( Utils::Obs::StringHelper::GetModuleConfigPath (" " ) );
197
197
if (!std::filesystem::exists (moduleConfigDirectory, ec))
198
198
std::filesystem::create_directories (moduleConfigDirectory, ec);
199
199
if (ec) {
@@ -203,10 +203,11 @@ bool MigratePersistentData()
203
203
}
204
204
205
205
// Move any existing persistent data to module config directory, then delete old file
206
- std::string oldPersistentDataPath =
207
- Utils::Obs::StringHelper::GetCurrentProfilePath () + " /../../../obsWebSocketPersistentData.json" ;
206
+ auto oldPersistentDataPath = std::filesystem::u8path ( Utils::Obs::StringHelper::GetCurrentProfilePath () +
207
+ " /../../../obsWebSocketPersistentData.json" ) ;
208
208
if (std::filesystem::exists (oldPersistentDataPath, ec)) {
209
- std::string persistentDataPath = Utils::Obs::StringHelper::GetModuleConfigPath (" persistent_data.json" );
209
+ auto persistentDataPath =
210
+ std::filesystem::u8path (Utils::Obs::StringHelper::GetModuleConfigPath (" persistent_data.json" ));
210
211
std::filesystem::copy_file (oldPersistentDataPath, persistentDataPath, ec);
211
212
std::filesystem::remove (oldPersistentDataPath, ec);
212
213
blog (LOG_INFO, " [MigratePersistentData] Persistent data migrated to new path" );
0 commit comments