Corretta le'leiminazione dei files di descrizione del direttorio
e del livello. git-svn-id: svn://10.65.10.50/trunk@3527 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4229abb2c4
commit
1b8778a2dc
@ -411,7 +411,15 @@ void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const lon
|
|||||||
{
|
{
|
||||||
TDir d;
|
TDir d;
|
||||||
d.get(LF_DIR);
|
d.get(LF_DIR);
|
||||||
const int items = d.eod();
|
const int items = (int) d.eod();
|
||||||
|
const long flags = d.flags(); // livello archivi
|
||||||
|
TFilename fn(dir);
|
||||||
|
fn << "/level.dir";
|
||||||
|
{
|
||||||
|
ofstream of(fn);
|
||||||
|
of << flags << '\n';
|
||||||
|
}
|
||||||
|
|
||||||
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);
|
||||||
@ -435,7 +443,7 @@ void TManutenzione_app::dump_trc(const char * dir, const bool des_too, const lon
|
|||||||
TConfig conf_des(descfname,DESCPAR);
|
TConfig conf_des(descfname,DESCPAR);
|
||||||
|
|
||||||
if (des_too) rc.set_des(&conf_des);
|
if (des_too) rc.set_des(&conf_des);
|
||||||
TFilename fn(dir);
|
fn = dir;
|
||||||
fn << "/f";fn << i;
|
fn << "/f";fn << i;
|
||||||
fn.ext("trr");
|
fn.ext("trr");
|
||||||
ofstream out(fn);
|
ofstream out(fn);
|
||||||
@ -976,17 +984,31 @@ void TManutenzione_app::load_des()
|
|||||||
TDir d;
|
TDir d;
|
||||||
TTrec r;
|
TTrec r;
|
||||||
|
|
||||||
d.get(LF_DIR);
|
d.get(LF_DIR,_nolock, _nordir,_sysdirop);
|
||||||
int items = (int)d.eod();
|
int items = (int)d.eod();
|
||||||
|
long flags = d.flags();
|
||||||
const bool standard = pref.empty();
|
const bool standard = pref.empty();
|
||||||
|
|
||||||
if (standard) // carica eventuali nuove descrizioni
|
if (standard) // carica eventuali nuove descrizioni ed il nuovo livello archivi
|
||||||
{
|
{
|
||||||
// Cerca in RECDESC i files f[nnn].dir, la cui numerazione inizia da items+1
|
// Cerca in RECDESC i files f[nnn].dir, la cui numerazione inizia da items+1
|
||||||
TFilename fn;
|
TFilename fn;
|
||||||
TDir td;
|
TDir td;
|
||||||
TTrec tr;
|
TTrec tr;
|
||||||
tr.zero();
|
tr.zero();
|
||||||
|
fn << DESCDIR << "/level.dir";
|
||||||
|
|
||||||
|
if (fexist(fn))
|
||||||
|
{
|
||||||
|
{
|
||||||
|
long fl;
|
||||||
|
ifstream level(fn);
|
||||||
|
level >> fl;
|
||||||
|
if (fl > flags) flags = fl;
|
||||||
|
}
|
||||||
|
unlink(fn);
|
||||||
|
}
|
||||||
|
|
||||||
for (int xf=items+1;;xf++)
|
for (int xf=items+1;;xf++)
|
||||||
{
|
{
|
||||||
fn = DESCDIR;
|
fn = DESCDIR;
|
||||||
@ -996,15 +1018,19 @@ void TManutenzione_app::load_des()
|
|||||||
break;
|
break;
|
||||||
// altrimenti lo carica nel direttorio standard,
|
// altrimenti lo carica nel direttorio standard,
|
||||||
// aggiungendo un tracciato vuoto
|
// aggiungendo un tracciato vuoto
|
||||||
ifstream in(fn);
|
{
|
||||||
in >> td;
|
ifstream in(fn);
|
||||||
td.put(xf,_nordir,_sysdirop);
|
in >> td;
|
||||||
tr.put(xf);
|
td.put(xf,_nordir,_sysdirop);
|
||||||
|
tr.put(xf);
|
||||||
|
}
|
||||||
unlink(fn);
|
unlink(fn);
|
||||||
}
|
}
|
||||||
xf--;
|
xf--;
|
||||||
d.eod() = (long)xf;
|
d.eod() = (long)xf;
|
||||||
d.put(LF_DIR);
|
d.eox() = (long)xf;
|
||||||
|
d.flags() = flags;
|
||||||
|
d.put(LF_DIR,_nordir,_sysdirop);
|
||||||
}
|
}
|
||||||
|
|
||||||
items = (int) d.eod();
|
items = (int) d.eod();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user