Aggiunta la possibilita' di saltare i files con flag oltre 10000

Significa aggiorna solo il tracciato.Riportata anche su R9604.


git-svn-id: svn://10.65.10.50/trunk@3682 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1996-09-27 13:07:32 +00:00
parent ab005b9443
commit 7d7ba87420

View File

@ -657,6 +657,10 @@ void TManutenzione_app::delete_riga ()
void TManutenzione_app::update_dir()
{
// Particolare significato dei flags oltre i 10000:
// trattasi di files PRASSI, (ad esempio i cespiti) che da noi non vengono toccati,
// in modo da evitare colpe inutili. Noi aggiorniamo solo i tracciati su dir e trc,
// ma il file fisico manco lo tocchiamo!!
const TString pref(prefix().name());
const bool is_com = prefix().is_com();
@ -694,7 +698,7 @@ void TManutenzione_app::update_dir()
bool towrite = FALSE;
// long flags = ds.flags();
const long flags = ds.flags();
// word len = ds.len();
// prefix().set(pref);
d.get(i);
@ -730,13 +734,13 @@ void TManutenzione_app::update_dir()
}
else
{
if (!yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
if (flags < 10000L && !yesno_box("Il file %d non puo' essere aperto: errore %d. Continuo?",i,err))
stop_run();
}
}
else
{
if (to_create)
if (flags < 10000L && to_create )
{
remove(d.filename());
TToken_string idx_names;
@ -763,7 +767,7 @@ void TManutenzione_app::update_dir()
}
*/
if (fexist(fs) && (fd != fs))
if (flags < 10000L && fexist(fs) && (fd != fs))
{
bool ok = TRUE;
TFilename path(fd.path());
@ -903,8 +907,11 @@ void TManutenzione_app::convert_dir()
// prefix().set("");
const TTrec & rs = (const TTrec &) _recs[i];
const TDir & ds = (const TDir &) _dirs[i];
const long flags = ds.flags();
// prefix().set(pref);
if (ds.len() > 0)
{
if (flags < 10000L)
{
TBaseisamfile b(i);
const int module = abs((int)ds.flags());
@ -921,6 +928,7 @@ void TManutenzione_app::convert_dir()
TSystemisamfile f(i);
f.update(rs);
if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
{
{
@ -945,7 +953,7 @@ void TManutenzione_app::convert_dir()
i == LF_PCON || i == LF_CAUSALI || i == LF_RCAUSALI)
to_create = TRUE;
if (to_create && has_module(module, CHK_DONGLE))
if (flags < 10000L && to_create && has_module(module, CHK_DONGLE))
{
d.get(i);
TFilename s(d.filename());
@ -958,7 +966,14 @@ void TManutenzione_app::convert_dir()
}
}
}
else
else // altrimenti se i flags sono oltre i fatidici 10000...
{
TTrec r(rs);
r.put(i);
}
}
else // altrimenti se la dimensione del tracciato e' zero...
{
TTrec r(rs);