Aggiunto controllo della validita' del file tramite TBaseisamfile::is_valid().

git-svn-id: svn://10.65.10.50/trunk@2156 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1995-11-15 17:52:41 +00:00
parent 169a54a270
commit aa029cbc5c

View File

@ -563,8 +563,17 @@ void TManutenzione_app::update_dir()
fclose(f);
if (size > 0L && d.len() > 0)
{
TBaseisamfile b(i);
int err = b.is_valid();
if (err == NOERR)
{
TLocalisamfile f(i);
} else
{
if (!yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
stop_run();
}
}
else
{
@ -739,7 +748,16 @@ void TManutenzione_app::convert_dir()
prefix().set(pref);
if (d.len() > 0)
{
TBaseisamfile b(i);
const int module = abs((int)d.flags());
int err = b.is_valid();
d.get(i, _nolock, _nordir, _sysdirop);
if (i > 2 && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
{
if (!yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
stop_run();
else continue;
}
TSystemisamfile f(i);
f.update(r);