Skip to content
This repository has been archived by the owner on Mar 5, 2024. It is now read-only.

Commit

Permalink
Instead of adding the legacy path to the search directory, just copy …
Browse files Browse the repository at this point in the history
…everything to the new folder and delete the old one.
  • Loading branch information
PazerOP committed Jan 9, 2021
1 parent 3044ab8 commit b9e577f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions tf2_bot_detector/Filesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,12 @@ void Filesystem::Init()
legacyPath /= APPDATA_SUBFOLDER;
if (std::filesystem::exists(legacyPath))
{
Log("Found legacy appdata folder {}, adding to search paths...", legacyPath);
m_SearchPaths.push_back(legacyPath);
Log("Found legacy appdata folder {}, copying to {}...", legacyPath, m_RoamingAppDataDir);
std::filesystem::copy(legacyPath, m_RoamingAppDataDir,
std::filesystem::copy_options::recursive | std::filesystem::copy_options::skip_existing);

Log("Copy complete. Deleting {}...", legacyPath);
std::filesystem::remove_all(legacyPath);
}
}

Expand Down

0 comments on commit b9e577f

Please sign in to comment.