diff --git a/ba/ba1100.cpp b/ba/ba1100.cpp index 1136d9b43..14ce0864c 100755 --- a/ba/ba1100.cpp +++ b/ba/ba1100.cpp @@ -547,23 +547,30 @@ void TManutenzione_app::update_dir() if (d.eox() > 0L) { d.get(i, _nolock, _nordir, _sysdirop); - d.eod() = 0L; - d.eox() = 0L; - d.put(i, _nordir, _sysdirop); + d.eod() = 0L; + d.eox() = 0L; + d.put(i, _nordir, _sysdirop); } } - else - if (d.len() > 0) + else + if (i > 2) { - 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); + if (d.len() > 0) + { + 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.eod() = 0L; + d.eox() = 0L; + d.put(i, _nordir, _sysdirop); + } } d.get(i, _nolock, _nordir, _sysdirop); bool to_create = (is_com ? d.is_com() : d.is_firm()); @@ -622,7 +629,7 @@ void TManutenzione_app::update_dir() fdi.ext(fsi.ext()); td.add(fdi); if (!fcopy(fsi, fdi)) - ok = FALSE; + ok = FALSE; } if (ok) {