mirror of
https://github.com/Mr-X-GTA/YimMenu.git
synced 2025-06-18 07:07:32 +08:00

- Removed try catch from main.cpp for better error logging - Added migration code to the YimMenu folder - Renamed globals to settings - refactor!: changed symlink
17 lines
482 B
C++
17 lines
482 B
C++
#pragma once
|
|
#include <filesystem>
|
|
|
|
namespace big
|
|
{
|
|
void do_migration(const std::filesystem::path& current_dir)
|
|
{
|
|
std::filesystem::path old_dir = std::getenv("appdata");
|
|
old_dir /= "BigBaseV2";
|
|
|
|
if (exists(old_dir) && !exists(current_dir))
|
|
{
|
|
LOG(INFO) << "YimMenu folder does not exist, migrating to new folder.";
|
|
std::filesystem::copy(old_dir, current_dir, std::filesystem::copy_options::recursive);
|
|
}
|
|
}
|
|
} |