diff options
| author | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-02-22 02:23:21 +0100 |
|---|---|---|
| committer | Admiral H. Curtiss <pikachu025@gmail.com> | 2023-02-24 20:32:19 +0100 |
| commit | 1ed0e014cd1c9087830fcee94e26f7dc3a3d45a8 (patch) | |
| tree | eaeef5a843c88c447c5d1eb22f028a44aa2c81f8 | |
| parent | 884917a6d534cdce4fe7b2f39e1188e591d64b0f (diff) | |
Migrate non-destructive calls of File::CopyDir() to File::Copy().
| -rw-r--r-- | Source/Core/Core/WiiRoot.cpp | 11 | ||||
| -rw-r--r-- | Source/Core/UICommon/AutoUpdate.cpp | 2 |
2 files changed, 8 insertions, 5 deletions
diff --git a/Source/Core/Core/WiiRoot.cpp b/Source/Core/Core/WiiRoot.cpp index b6e38be832..4c39619e43 100644 --- a/Source/Core/Core/WiiRoot.cpp +++ b/Source/Core/Core/WiiRoot.cpp @@ -186,7 +186,10 @@ static void InitializeDeterministicWiiSaves(FS::FileSystem* session_fs, const auto& netplay_redirect_folder = boot_session_data.GetWiiSyncRedirectFolder(); if (!netplay_redirect_folder.empty()) - File::CopyDir(netplay_redirect_folder, s_temp_redirect_root + "/"); + { + File::CreateDirs(s_temp_redirect_root); + File::Copy(netplay_redirect_folder, s_temp_redirect_root); + } } } @@ -359,11 +362,11 @@ void InitializeWiiFileSystemContents( if (!File::IsDirectory(save_redirect->m_target_path)) { - File::CreateFullPath(save_redirect->m_target_path + "/"); + File::CreateDirs(save_redirect->m_target_path); if (save_redirect->m_clone) { - File::CopyDir(Common::GetTitleDataPath(title_id, Common::FROM_SESSION_ROOT), - save_redirect->m_target_path); + File::Copy(Common::GetTitleDataPath(title_id, Common::FROM_SESSION_ROOT), + save_redirect->m_target_path); } } s_nand_redirects.emplace_back(IOS::HLE::FS::NandRedirect{ diff --git a/Source/Core/UICommon/AutoUpdate.cpp b/Source/Core/UICommon/AutoUpdate.cpp index 35b17ed19d..b67c499c14 100644 --- a/Source/Core/UICommon/AutoUpdate.cpp +++ b/Source/Core/UICommon/AutoUpdate.cpp @@ -248,7 +248,7 @@ void AutoUpdateChecker::TriggerUpdate(const AutoUpdateChecker::NewVersionInforma #ifdef __APPLE__ // Copy the updater so it can update itself if needed. const std::string reloc_updater_path = UpdaterPath(true); - if (!File::CopyDir(UpdaterPath(), reloc_updater_path)) + if (!File::Copy(UpdaterPath(), reloc_updater_path)) { CriticalAlertFmtT("Unable to create updater copy."); return; |
