Patch level : 12.0 332
Files correlati : ba1.exe Ricostruiti gli indici delle tabelle per evitare problemi con archivi danneggiati Resa obbligatoria la copia in installazione. git-svn-id: svn://10.65.10.50/branches/R_10_00@23520 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
69249f3555
commit
8ed1eb7c1d
@ -1012,119 +1012,6 @@ void TManutenzione_app::update_dir()
|
|||||||
|
|
||||||
if (to_create && !cmn_file)
|
if (to_create && !cmn_file)
|
||||||
{
|
{
|
||||||
/* if (flags < 10000L && flags > -1L && fs.exist() && (fd != fs))
|
|
||||||
{
|
|
||||||
|
|
||||||
bool ok = true;
|
|
||||||
TFilename path(fd.path());
|
|
||||||
bool found = false;
|
|
||||||
|
|
||||||
for (int j = i + 1; !found && j <= update_items; j++)
|
|
||||||
{
|
|
||||||
const TDir & dn = (const TDir &) _dirs[j];
|
|
||||||
TFilename fn(dn.filename());
|
|
||||||
|
|
||||||
if (fs == fn)
|
|
||||||
{
|
|
||||||
TTrec wrs(i), wrd(j);
|
|
||||||
wrd = wrs; wrd.set_num(j); // Copia e rinumera
|
|
||||||
wrd.put(j);
|
|
||||||
wrs.zero();
|
|
||||||
wrs.put(i);
|
|
||||||
|
|
||||||
TDir wds(i), wdd(j);
|
|
||||||
wdd.set(wds.name(), wds.eod(), wds.flags(), wds.des(), wds.expr());
|
|
||||||
wdd.set_eox(wds.eox());
|
|
||||||
wdd.set_len(wrd.len());
|
|
||||||
wdd.put(j, _nordir, _sysdirop);
|
|
||||||
prefix().destroy_info(j);
|
|
||||||
|
|
||||||
wds.set(ds.name(), 0L, 0L, ds.des(), ds.expr());
|
|
||||||
wds.set_eox(0L);
|
|
||||||
wds.set_len(0);
|
|
||||||
wds.put(i, _nordir, _sysdirop);
|
|
||||||
prefix().destroy_info(i);
|
|
||||||
found = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (found)
|
|
||||||
continue;
|
|
||||||
path.rtrim(1);
|
|
||||||
|
|
||||||
if (path.full() && !path.exist())
|
|
||||||
ok = make_dir(path);
|
|
||||||
if (ok && fcopy(fs, fd))
|
|
||||||
{
|
|
||||||
TToken_string ts(10),td(10);
|
|
||||||
td.cut(0);
|
|
||||||
get_table_names(i,ts,0x2); // Get index names of current file in current dir
|
|
||||||
for (int j=1; j<= ts.items() && ok; j++)
|
|
||||||
{
|
|
||||||
const TFilename fsi(ts.get());
|
|
||||||
TFilename fdi(fd); // Nuovo nome. (Con l'estensione)
|
|
||||||
fdi.ext("");
|
|
||||||
if (j > 1) // Means that more indexes are in TToken_string ts
|
|
||||||
{
|
|
||||||
const TFixed_string xx(fdi.name());
|
|
||||||
if (xx.len() < 8)
|
|
||||||
fdi << ('0' + j);
|
|
||||||
else
|
|
||||||
fdi[8] = ('0' + j);
|
|
||||||
}
|
|
||||||
fdi.ext(fsi.ext());
|
|
||||||
td.add(fdi);
|
|
||||||
if (!fcopy(fsi, fdi))
|
|
||||||
ok = false;
|
|
||||||
}
|
|
||||||
if (ok)
|
|
||||||
{
|
|
||||||
remove(fs); // Rimuove i files sorgenti. Crea un eventuale .cgp
|
|
||||||
fd.ext("cgp");
|
|
||||||
FILE *o=NULL;
|
|
||||||
if (ts.items() > 1)
|
|
||||||
{
|
|
||||||
fs.ext("cgp");
|
|
||||||
remove(fs);
|
|
||||||
o=fopen(fd,"w");
|
|
||||||
}
|
|
||||||
ts.restart();
|
|
||||||
td.restart();
|
|
||||||
for (int j=1; j<=ts.items(); j++)
|
|
||||||
{
|
|
||||||
remove(ts.get());
|
|
||||||
if (ts.items() > 1) // Means that fd.cgp must be created
|
|
||||||
{
|
|
||||||
TFilename ff=td.get();
|
|
||||||
ff.ext("");
|
|
||||||
ff.rtrim(1);
|
|
||||||
fprintf(o,"%s\n",ff.name());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (o!=NULL)
|
|
||||||
fclose(o);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
remove(fd); // Remove all destinations written
|
|
||||||
td.restart();
|
|
||||||
for (int j=1; j<=td.items(); j++)
|
|
||||||
remove(td.get());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
ok = false;
|
|
||||||
if (ok)
|
|
||||||
{
|
|
||||||
d.set(ds.name(), d.eox(), 0L, ds.des(), d.expr());
|
|
||||||
towrite = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!fexist(fs) && !valid_file) // Controlla eventali nomi di files non validi (ed es. %.dbf ecc.)
|
|
||||||
{
|
|
||||||
d.set(ds.name(), d.eox(), 0L, ds.des(), d.expr());
|
|
||||||
towrite = true;
|
|
||||||
}*/
|
|
||||||
d.set(ds.name(), d.eox(), 0L, ds.des(), d.expr());
|
d.set(ds.name(), d.eox(), 0L, ds.des(), d.expr());
|
||||||
towrite = true;
|
towrite = true;
|
||||||
}
|
}
|
||||||
@ -1226,7 +1113,7 @@ void TManutenzione_app::convert_dir()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (i > LF_USER && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
|
if (i > LF_USER && err != NOERR && ((is_com && d.is_com()) || (!is_com && d.is_firm())))
|
||||||
{
|
{
|
||||||
if (err == _istrcerr || err == _isbadtrc)
|
if (err == _istrcerr || err == _isbadtrc)
|
||||||
{
|
{
|
||||||
@ -1267,6 +1154,9 @@ void TManutenzione_app::convert_dir()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (i <= LF_TAB)
|
||||||
|
f.packindex();
|
||||||
|
|
||||||
f.update(rs, false);
|
f.update(rs, false);
|
||||||
if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
|
if (f.status() == 8) // cio' significa che e' accaduto quasi l'irreparabile...
|
||||||
{
|
{
|
||||||
|
@ -926,13 +926,11 @@ void TInstaller_mask::backup() const
|
|||||||
dst << ' ' << TDate(TODAY).date2ansi(); // Lo spazio rende inutilizzabile lo studio
|
dst << ' ' << TDate(TODAY).date2ansi(); // Lo spazio rende inutilizzabile lo studio
|
||||||
|
|
||||||
TToken_string msg(256, '\n');
|
TToken_string msg(256, '\n');
|
||||||
msg.add(TR("Si consiglia creare una copia dello studio ")); msg << src.name();
|
msg.add(TR("Verrà effettuata una copia dello studio ")); msg << src.name();
|
||||||
msg.add(TR("nella cartella ")); msg << dst;
|
msg.add(TR("nella cartella ")); msg << dst;
|
||||||
msg.add(TR("L'operazione potrebbe richiedere alcuni minuti."));
|
msg.add(TR("L'operazione potrebbe richiedere alcuni minuti."));
|
||||||
msg.add("");
|
message_box(msg);
|
||||||
msg.add(TR("Si desidera effetture la copia?"));
|
copy_tree(src, dst);
|
||||||
if (yesno_box(msg))
|
|
||||||
copy_tree(src, dst);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user