Make media re-init a user choice.
This commit is contained in:
parent
6b0b88d812
commit
1c5237db6f
@ -440,15 +440,20 @@ distExtract(char *parent, Distribution *me)
|
||||
continue;
|
||||
}
|
||||
else if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
|
||||
msgConfirm("Unable to open %s: %s.\nReinitializing media.",
|
||||
buf, !intr ? "I/O error." : "User interrupt.");
|
||||
mediaDevice->shutdown(mediaDevice);
|
||||
if (!mediaDevice->init(mediaDevice)) {
|
||||
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
|
||||
buf, !intr ? "I/O error." : "User interrupt.")) {
|
||||
mediaDevice->shutdown(mediaDevice);
|
||||
if (!mediaDevice->init(mediaDevice)) {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
/* Try to get the distribution as a single file */
|
||||
|
@ -440,15 +440,20 @@ distExtract(char *parent, Distribution *me)
|
||||
continue;
|
||||
}
|
||||
else if (fp == (FILE *)IO_ERROR || intr) { /* Hard error, can't continue */
|
||||
msgConfirm("Unable to open %s: %s.\nReinitializing media.",
|
||||
buf, !intr ? "I/O error." : "User interrupt.");
|
||||
mediaDevice->shutdown(mediaDevice);
|
||||
if (!mediaDevice->init(mediaDevice)) {
|
||||
if (!msgYesNo("Unable to open %s: %s.\nReinitialize media?",
|
||||
buf, !intr ? "I/O error." : "User interrupt.")) {
|
||||
mediaDevice->shutdown(mediaDevice);
|
||||
if (!mediaDevice->init(mediaDevice)) {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
/* Try to get the distribution as a single file */
|
||||
|
Loading…
Reference in New Issue
Block a user