mirror of
https://github.com/holub/mame
synced 2025-04-26 02:07:14 +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 (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
delete chd;
|
||||||
// delete the output file
|
// delete the output file
|
||||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||||
if (output_chd_str != NULL)
|
if (output_chd_str != NULL)
|
||||||
osd_rmfile(*output_chd_str);
|
osd_rmfile(*output_chd_str);
|
||||||
delete chd;
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1808,11 +1808,11 @@ static void do_create_hd(parameters_t ¶ms)
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
delete chd;
|
||||||
// delete the output file
|
// delete the output file
|
||||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||||
if (output_chd_str != NULL)
|
if (output_chd_str != NULL)
|
||||||
osd_rmfile(*output_chd_str);
|
osd_rmfile(*output_chd_str);
|
||||||
delete chd;
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1900,11 +1900,11 @@ static void do_create_cd(parameters_t ¶ms)
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
delete chd;
|
||||||
// delete the output file
|
// delete the output file
|
||||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||||
if (output_chd_str != NULL)
|
if (output_chd_str != NULL)
|
||||||
osd_rmfile(*output_chd_str);
|
osd_rmfile(*output_chd_str);
|
||||||
delete chd;
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2025,11 +2025,11 @@ static void do_create_ld(parameters_t ¶ms)
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
delete chd;
|
||||||
// delete the output file
|
// delete the output file
|
||||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||||
if (output_chd_str != NULL)
|
if (output_chd_str != NULL)
|
||||||
osd_rmfile(*output_chd_str);
|
osd_rmfile(*output_chd_str);
|
||||||
delete chd;
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2150,11 +2150,11 @@ static void do_copy(parameters_t ¶ms)
|
|||||||
}
|
}
|
||||||
catch (...)
|
catch (...)
|
||||||
{
|
{
|
||||||
|
delete chd;
|
||||||
// delete the output file
|
// delete the output file
|
||||||
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
astring *output_chd_str = params.find(OPTION_OUTPUT);
|
||||||
if (output_chd_str != NULL)
|
if (output_chd_str != NULL)
|
||||||
osd_rmfile(*output_chd_str);
|
osd_rmfile(*output_chd_str);
|
||||||
delete chd;
|
|
||||||
throw;
|
throw;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user