Aggiunta alla loaddes() il caricamento dei files di descrizione dei
direttori, cosi' ba1 si accorgera' se ci sono anche files nuovi. git-svn-id: svn://10.65.10.50/trunk@3515 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1042834d83
commit
f81a210b20
@ -409,7 +409,9 @@ void TManutenzione_app::close_history()
|
|||||||
|
|
||||||
void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const long modules)
|
void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const long modules)
|
||||||
{
|
{
|
||||||
const int items = _recs.items();
|
TDir d;
|
||||||
|
d.get(LF_DIR);
|
||||||
|
const int items = d.eod();
|
||||||
TString s("Scarico dei tracciati standard in ");
|
TString s("Scarico dei tracciati standard in ");
|
||||||
s << dir;
|
s << dir;
|
||||||
TProgind p(items ? items : 1, s, FALSE, TRUE, 70);
|
TProgind p(items ? items : 1, s, FALSE, TRUE, 70);
|
||||||
@ -434,10 +436,13 @@ void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const lon
|
|||||||
|
|
||||||
if (des_too) rc.set_des(&conf_des);
|
if (des_too) rc.set_des(&conf_des);
|
||||||
TFilename fn(dir);
|
TFilename fn(dir);
|
||||||
fn << "/d";fn << i;
|
fn << "/f";fn << i;
|
||||||
fn.ext("trr");
|
fn.ext("trr");
|
||||||
ofstream out(fn);
|
ofstream out(fn);
|
||||||
out << rc;
|
out << rc;
|
||||||
|
fn.ext("dir");
|
||||||
|
ofstream out_dir(fn);
|
||||||
|
out_dir << dr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -972,9 +977,37 @@ void TManutenzione_app::load_des()
|
|||||||
TTrec r;
|
TTrec r;
|
||||||
|
|
||||||
d.get(LF_DIR);
|
d.get(LF_DIR);
|
||||||
const int items = (int)d.eod();
|
int items = (int)d.eod();
|
||||||
const bool standard = pref.empty();
|
const bool standard = pref.empty();
|
||||||
|
|
||||||
|
if (standard) // carica eventuali nuove descrizioni
|
||||||
|
{
|
||||||
|
// Cerca in RECDESC i files f[nnn].dir, la cui numerazione inizia da items+1
|
||||||
|
TFilename fn;
|
||||||
|
TDir td;
|
||||||
|
TTrec tr;
|
||||||
|
tr.zero();
|
||||||
|
for (int xf=items+1;;xf++)
|
||||||
|
{
|
||||||
|
fn = DESCDIR;
|
||||||
|
fn << "/f" << xf;
|
||||||
|
fn.ext("dir");
|
||||||
|
if (!fexist(fn)) // appena non ne trova uno ha finito
|
||||||
|
break;
|
||||||
|
// altrimenti lo carica nel direttorio standard,
|
||||||
|
// aggiungendo un tracciato vuoto
|
||||||
|
ifstream in(fn);
|
||||||
|
in >> td;
|
||||||
|
td.put(xf,_nordir,_sysdirop);
|
||||||
|
tr.put(xf);
|
||||||
|
unlink(fn);
|
||||||
|
}
|
||||||
|
xf--;
|
||||||
|
d.eod() = (long)xf;
|
||||||
|
d.put(LF_DIR);
|
||||||
|
}
|
||||||
|
|
||||||
|
items = (int) d.eod();
|
||||||
TString80 s("Caricamento descrizioni archivi ");
|
TString80 s("Caricamento descrizioni archivi ");
|
||||||
|
|
||||||
if (standard) s << "standard";
|
if (standard) s << "standard";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user