Correzione segnalata da rosalba alla conversione

git-svn-id: svn://10.65.10.50/trunk@1831 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1995-09-15 11:10:15 +00:00
parent 3e33129bc0
commit d3eaeb214b

View File

@ -553,7 +553,18 @@ void TManutenzione_app::update_dir()
} }
} }
else else
if (d.len() > 0)
{
TLocalisamfile f(i); TLocalisamfile f(i);
}
else
{
remove(d.filename());
TToken_string idx_names;
get_idx_names(i, idx_names);
for (const char * idx_name = idx_names.get(); idx_name != NULL; idx_name = idx_names.get())
remove(idx_name);
}
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()) if (s != d.name())
@ -583,7 +594,10 @@ void TManutenzione_app::update_dir()
fd.cut(0); fd.cut(0);
fd << fs.path() << name; fd << fs.path() << name;
} }
if (fd != fs)
{
TFilename path(fd.path()); TFilename path(fd.path());
path.rtrim(1); path.rtrim(1);
if (path.not_empty() && !fexist(path)) if (path.not_empty() && !fexist(path))
ok = make_dir(path); ok = make_dir(path);
@ -662,6 +676,7 @@ void TManutenzione_app::update_dir()
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());