Corretta la update_dir() nel caso in cui deve cambiare nome ai files
ed effettuare le copie. Qui e' contemplato anche il caso in cui Un file comune non ha il '%' in dir.gen di com. git-svn-id: svn://10.65.10.50/trunk@1906 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b8d971ef06
commit
1508e0087c
@ -574,9 +574,6 @@ void TManutenzione_app::update_dir()
|
|||||||
}
|
}
|
||||||
d.get(i, _nolock, _nordir, _sysdirop);
|
d.get(i, _nolock, _nordir, _sysdirop);
|
||||||
bool to_create = (is_com ? d.is_com() : d.is_firm());
|
bool to_create = (is_com ? d.is_com() : d.is_firm());
|
||||||
if (s != d.name())
|
|
||||||
{
|
|
||||||
bool ok = TRUE;
|
|
||||||
if (to_create)
|
if (to_create)
|
||||||
{
|
{
|
||||||
TDir d1;
|
TDir d1;
|
||||||
@ -592,17 +589,16 @@ void TManutenzione_app::update_dir()
|
|||||||
|
|
||||||
fs.ext("dbf");
|
fs.ext("dbf");
|
||||||
fd.ext("dbf");
|
fd.ext("dbf");
|
||||||
|
|
||||||
if (fexist(fs))
|
|
||||||
{
|
|
||||||
if (is_firm)
|
if (is_firm)
|
||||||
{
|
{
|
||||||
TString name(fd);
|
TString name(fd);
|
||||||
fd.cut(0);
|
fd.cut(0);
|
||||||
fd << fs.path() << name;
|
fd << fs.path() << name;
|
||||||
}
|
}
|
||||||
if (fd != fs)
|
|
||||||
|
if (fexist(fs) && (fd != fs))
|
||||||
{
|
{
|
||||||
|
bool ok = TRUE;
|
||||||
TFilename path(fd.path());
|
TFilename path(fd.path());
|
||||||
|
|
||||||
path.rtrim(1);
|
path.rtrim(1);
|
||||||
@ -665,31 +661,16 @@ void TManutenzione_app::update_dir()
|
|||||||
for (int j=1; j<=td.items(); j++)
|
for (int j=1; j<=td.items(); j++)
|
||||||
remove(td.get());
|
remove(td.get());
|
||||||
}
|
}
|
||||||
// const TFilename fsi(CGetIdxName((char *)(const char *)fs));
|
|
||||||
// const TFilename fdi(CGetIdxName((char *)(const char *)fd));
|
|
||||||
//
|
|
||||||
// if (fcopy(fsi, fdi))
|
|
||||||
// {
|
|
||||||
// remove(fs);
|
|
||||||
// remove(fsi);
|
|
||||||
// }
|
|
||||||
// else
|
|
||||||
// {
|
|
||||||
// remove(fd);
|
|
||||||
// ok = FALSE;
|
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
ok = FALSE;
|
ok = FALSE;
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
d.set(s, d.eox(), 0L, desc, d.expr());
|
d.set(s, d.eox(), 0L, desc, d.expr());
|
||||||
towrite = TRUE;
|
towrite = TRUE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
towrite = (desc != d.des());
|
towrite = (desc != d.des());
|
||||||
@ -699,7 +680,7 @@ void TManutenzione_app::update_dir()
|
|||||||
if (towrite)
|
if (towrite)
|
||||||
d.put(i, _nordir, _sysdirop);
|
d.put(i, _nordir, _sysdirop);
|
||||||
d.get(i);
|
d.get(i);
|
||||||
}
|
} // end of for scope
|
||||||
prefix().set(pref);
|
prefix().set(pref);
|
||||||
|
|
||||||
if (items >= orig_items) return;
|
if (items >= orig_items) return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user