Make media re-init a user choice.

This commit is contained in:
Jordan K. Hubbard 1997-01-29 03:30:24 +00:00
parent 6b0b88d812
commit 1c5237db6f
2 changed files with 22 additions and 12 deletions

View File

@ -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);

View File

@ -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);