[APP] Don't delete Zar extraction folder on failure if empty
This commit is contained in:
@@ -1331,8 +1331,9 @@ void EmulatorWindow::ExtractZarchive() {
|
|||||||
if (result != X_STATUS_SUCCESS) {
|
if (result != X_STATUS_SUCCESS) {
|
||||||
std::error_code ec;
|
std::error_code ec;
|
||||||
|
|
||||||
// delete incomplete output file
|
if (!std::filesystem::is_empty(abs_extract_dir)) {
|
||||||
std::filesystem::remove(abs_extract_dir, ec);
|
std::filesystem::remove(abs_extract_dir, ec);
|
||||||
|
}
|
||||||
|
|
||||||
summary += fmt::format("\nFailed: {}", zarchive_file_path);
|
summary += fmt::format("\nFailed: {}", zarchive_file_path);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user