replace progress box result from bool to Result. Display error box if progress box fails.

This commit is contained in:
ITotalJustice
2025-05-21 16:50:18 +01:00
parent 71415e5044
commit 654f3a1446
14 changed files with 308 additions and 432 deletions

View File

@@ -212,6 +212,13 @@ auto ProgressBox::ShouldExit() -> bool {
return m_stop_source.stop_requested();
}
auto ProgressBox::ShouldExitResult() -> Result {
if (ShouldExit()) {
R_THROW(0xFFFF);
}
R_SUCCEED();
}
auto ProgressBox::CopyFile(const fs::FsPath& src_path, const fs::FsPath& dst_path) -> Result {
fs::FsNativeSd fs;
R_TRY(fs.GetFsOpenResult());