Patch level : 12.0 1174

Files correlati     : ba1.exe

Commento:
Migliorata protezione aggiornamento tracciati sulla base dei dati Team
This commit is contained in:
Alessandro Bonazzi 2022-06-18 18:24:09 +02:00
parent 5aa4a8cc34
commit a18fa6ec27
2 changed files with 37 additions and 15 deletions

View File

@ -13,14 +13,10 @@
#include "ba1100.h" #include "ba1100.h"
#include "ba1103.h" #include "ba1103.h"
#include <applicat.h>
#include <dongle.h> #include <dongle.h>
#include <printer.h> #include <relapp.h>
#include <progind.h> #include <progind.h>
#include <reputils.h>
#include <stdtypes.h>
#include <utility.h> #include <utility.h>
#include <user.h> #include <user.h>
#ifdef WIN32 #ifdef WIN32
@ -54,6 +50,7 @@ HIDDEN bool browse_file_handler(TMask_field& f, KEY k)
} }
f.set_focus(); f.set_focus();
} }
return true; return true;
} }
@ -277,7 +274,6 @@ bool TManutenzione_app::create() // initvar e arrmask
const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type"); const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type");
_superprassi = (type == 1) || (type == 2); _superprassi = (type == 1) || (type == 2);
} }
if (argc() > 2 && sw == "-C") if (argc() > 2 && sw == "-C")
{ {
update(); update();
@ -306,9 +302,32 @@ bool TManutenzione_app::create() // initvar e arrmask
dump_trc(dir, des_too, modules); dump_trc(dir, des_too, modules);
return false; return false;
} }
else else
if (!::dongle().demo() && !set_firm()) {
return false; TString pref = prefix().name();
prefix().set("");
load_des();
prefix().set(pref);
TDir d;
d.get(LF_USER, _nolock, _comdir, _sysdirop);
if (TString(d.name()) != ((TDir &)_refdirs[LF_USER]).name())
{
d.set_name(((TDir &)_refdirs[LF_USER]).name());
d.put(LF_USER, _comdir, _sysdirop);
}
d.get(LF_NDITTE, _nolock, _comdir, _sysdirop);
if (TString(d.name()) != ((TDir &)_refdirs[LF_NDITTE]).name())
{
d.set_name(((TDir &)_refdirs[LF_NDITTE]).name());
d.put(LF_NDITTE, _comdir, _sysdirop);
}
if (!::dongle().demo() && !set_firm())
return false;
}
_firm = atol(prefix().name()); _firm = atol(prefix().name());
load_des(); load_des();
@ -333,8 +352,8 @@ bool TManutenzione_app::destroy()
return TApplication::destroy(); return TApplication::destroy();
} }
void TManutenzione_app::open_log() void TManutenzione_app::open_log()
{ {
_print_log = false; _print_log = false;
if (_log == NULL) if (_log == NULL)
{ {
@ -1039,8 +1058,8 @@ void TManutenzione_app::recover()
TTrec & rs = (TTrec &)_recs[i]; TTrec & rs = (TTrec &)_recs[i];
TSystemisamfile f(i); TSystemisamfile f(i);
if (ds.is_com()) if (ds.is_com() || ((TDir &)_refdirs[i]).is_com())
f.recover(ds, rs); f.recover(ds, rs, ((TDir &)_refdirs[i]));
} //for(i=LF_USER; i<=update_items; i++) } //for(i=LF_USER; i<=update_items; i++)
} }
@ -1069,8 +1088,8 @@ void TManutenzione_app::recover()
TTrec & rs = (TTrec &)_recs[i]; TTrec & rs = (TTrec &)_recs[i];
TSystemisamfile f(i); TSystemisamfile f(i);
if (ds.is_firm()) if (ds.is_firm() || ((TDir &)_refdirs[i]).is_firm())
f.recover(ds, rs); f.recover(ds, rs, ((TDir &)_refdirs[i]));
} //for(i=LF_USER; i<=update_items; i++) } //for(i=LF_USER; i<=update_items; i++)
} }
} }
@ -1366,6 +1385,8 @@ void TManutenzione_app::load_des()
_dirs.add(d, i); _dirs.add(d, i);
_recs.add(r, i); _recs.add(r, i);
} }
if (standard)
_refdirs = _dirs;
} }
bool TManutenzione_app::set_converting() bool TManutenzione_app::set_converting()

View File

@ -108,6 +108,7 @@ class TManutenzione_app : public TSkeleton_application
{ {
TDir_sheet* _browse; TDir_sheet* _browse;
TArray _dirs; TArray _dirs;
TArray _refdirs;
TArray _recs; TArray _recs;
TMask* _mask; TMask* _mask;
long _firm; long _firm;