| 870 | } |
| 871 | |
| 872 | string CopyFileToFolder(const std::string& sourceFilePath, const std::string& targetFolderPath, bool isNeedHook, DWORD exitCode) { |
| 873 | std::string targetFilePath = targetFolderPath + "\\" + sourceFilePath.substr(sourceFilePath.find_last_of("\\/") + 1); |
| 874 | |
| 875 | CopyFileA(sourceFilePath.c_str(), targetFilePath.c_str(), FALSE); |
| 876 | |
| 877 | if (isNeedHook) { |
| 878 | std::lock_guard<std::mutex> lock(mtx); |
| 879 | bool isSucc = fixFile(targetFilePath, exitCode); |
| 880 | if (!isSucc) |
| 881 | return ""; |
| 882 | } |
| 883 | |
| 884 | return targetFilePath; |
| 885 | } |
| 886 | |
| 887 | bool DeleteDirectory(const string& path) { |
| 888 | WIN32_FIND_DATAA findData; |