Make media re-init a user choice.
This commit is contained in:
parent
6b0b88d812
commit
1c5237db6f
@ -440,8 +440,8 @@ 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.");
|
||||
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;
|
||||
@ -450,6 +450,11 @@ distExtract(char *parent, Distribution *me)
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Try to get the distribution as a single file */
|
||||
snprintf(buf, sizeof buf, "%s/%s.tgz", path, dist);
|
||||
|
@ -440,8 +440,8 @@ 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.");
|
||||
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;
|
||||
@ -450,6 +450,11 @@ distExtract(char *parent, Distribution *me)
|
||||
else
|
||||
goto getinfo;
|
||||
}
|
||||
else {
|
||||
status = FALSE;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* Try to get the distribution as a single file */
|
||||
snprintf(buf, sizeof buf, "%s/%s.tgz", path, dist);
|
||||
|
Loading…
Reference in New Issue
Block a user