mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
chdman: fixed deletion of output file in case of an error (nw)
This commit is contained in:
parent
5363a89597
commit
54e9da3266
@ -1635,11 +1635,11 @@ static void do_create_raw(parameters_t ¶ms)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete chd;
|
||||
// delete the output file
|
||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||
if (output_chd_str != NULL)
|
||||
osd_rmfile(*output_chd_str);
|
||||
delete chd;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1808,11 +1808,11 @@ static void do_create_hd(parameters_t ¶ms)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete chd;
|
||||
// delete the output file
|
||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||
if (output_chd_str != NULL)
|
||||
osd_rmfile(*output_chd_str);
|
||||
delete chd;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -1900,11 +1900,11 @@ static void do_create_cd(parameters_t ¶ms)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete chd;
|
||||
// delete the output file
|
||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||
if (output_chd_str != NULL)
|
||||
osd_rmfile(*output_chd_str);
|
||||
delete chd;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2025,11 +2025,11 @@ static void do_create_ld(parameters_t ¶ms)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete chd;
|
||||
// delete the output file
|
||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||
if (output_chd_str != NULL)
|
||||
osd_rmfile(*output_chd_str);
|
||||
delete chd;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
@ -2150,11 +2150,11 @@ static void do_copy(parameters_t ¶ms)
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
delete chd;
|
||||
// delete the output file
|
||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||
if (output_chd_str != NULL)
|
||||
osd_rmfile(*output_chd_str);
|
||||
delete chd;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user