I just realized that not all printer models home at the very top like a delta printer.
The re-homing could be dangerous for a printer that homes the z-axis on the printbed. So here is a new version (from my own 0.92.8 version):
...
if(n == -1)
{
Com::printFLN(Com::tSDReadError);
UI_ERROR("SD Read Error");
// Second try in case of recoverable errors
sd.file.seekSet(sd.sdpos);
n = sd.file.read();
if(n == -1)
{
Com::printErrorFLN(PSTR("SD error did not recover!"));
sd.sdmode = 0;
Printer::kill(false);
#if DRIVE_SYSTEM == DELTA
Printer::homeAxis(true, true, true);
#else
Printer::homeAxis(true, true, false);
#endif
break;
}
UI_ERROR("SD error fixed");
}
...