Patch level : 10.0

Files correlati     : ba2
Ricompilazione Demo : [ ]
Commento            :
0001324: Backup su chiavetta USB
La procedura di backup non consente di selezionare i dischi "virtuali" ossia chiavette usb


git-svn-id: svn://10.65.10.50/trunk@18893 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2009-05-20 15:37:50 +00:00
parent da391e0167
commit 9bd3d6ed94
8 changed files with 114 additions and 57 deletions

View File

@ -140,8 +140,6 @@ TMenu& TMenuitem::menu() const
bool TMenuitem::create(const char* t)
{
bool visible = true;
TString16 flags;
char brace;
int start = 0;
@ -157,7 +155,6 @@ bool TMenuitem::create(const char* t)
switch(toupper(flags[i]))
{
case 'D': _exist = false; break;
case 'E': visible = dongle().active(EEAUT); // Nascondi i moduli dipendenti da EE
case 'F': _firm = true; break;
case 'P': _password = true; break;
case 'R': _reloadmenu = true; break;
@ -166,32 +163,32 @@ bool TMenuitem::create(const char* t)
}
}
if (visible)
bool visible = true;
if (_type == '<')
{
if (_type == '<')
const word mod = dongle().module_name2code(_action.left(2));
visible = dongle().shown(mod);
if (visible)
{
if (_action.find('.') < 0)
_action << ".men";
TFilename n = _action;
if (n.custom_path())
visible = menu().read(n, _action);
else
_action.cut(0);
if (n.custom_path())
visible = menu().read(n, _action);
else
_action.cut(0);
_type = '[';
}
if (_action.blank())
_exist = _enabled = false;
// Controlla lo stato di aggiornamento
if (_enabled && is_program())
_enabled = !menu().is_dangerous(_action);
else
_action.cut(0);
}
else
{
_action.cut(0);
if (!visible || _action.blank())
_exist = _enabled = false;
}
// Controlla lo stato di aggiornamento
if (_enabled && is_program())
_enabled = !menu().is_dangerous(_action);
return visible;
}

View File

@ -106,6 +106,8 @@ public:
bool query_firm() const { return _firm != 0; }
bool enabled() const;
bool disabled() const { return !enabled(); }
int module() const { return ((TToken_string&)_modules).get_int(0); }
void reset_permissions();
bool perform(int i);

View File

@ -350,9 +350,9 @@ void TMenu::import(const char* filename, TString& first)
TFilename name = line.sub(bracket+1, endbracket);
if (name.custom_path())
{
bool proceed = true;
if (line.find('E', endbracket+1) > 0)
proceed = dongle().active(EEAUT);
const TString& mod = name.name_only().left(2);
const word cod = dongle().module_name2code(mod);
const bool proceed = dongle().shown(cod);
if (proceed)
{
import(name, name);

View File

@ -185,10 +185,19 @@ bool TInstaller_mask::add_module(TConfig& ini, const TString& module, bool patch
if (!ini.set_paragraph(module))
return false;
// Nasconde i moduli Enterprise Edition ad occhi indiscreti
const bool ee = ini.get_bool("Ee");
if (ee && !dongle().active(EEAUT))
return false;
// Nasconde i moduli riservati da occhi indiscreti
TAuto_token_string oem = ini.get("OEM");
if (oem.full())
{
if (oem.get_pos(dongle().oem() < 0))
return false;
}
else
{
const bool ee = ini.get_bool("Ee");
if (ee && dongle().oem() != 0)
return false;
}
const int numpatch = ini.get_int("Patch");
TString4 strpatch;
@ -229,6 +238,9 @@ bool TInstaller_mask::add_header(TConfig& ini, const TString& module)
bool TInstaller_mask::has_module(int modnumber) const
{
if (modnumber > 0 && !dongle().shown(modnumber))
return false;
//se sei un server hai tutti i moduli da installare
if (station_type() == 2)
return true;
@ -271,8 +283,8 @@ int TInstaller_mask::precheck_modules(bool only_newer)
bool check_enabled = true;
_setup_run = false; //inizializzazione del flag di controllo di lancio di setup.exe
TString_array& array = rows_array();
FOR_EACH_ARRAY_ROW(array, r, row)
TString_array& a = rows_array();
FOR_EACH_ARRAY_ROW(a, r, row)
{
TToken_string& rigar = *row;
cod_module = rigar.get(C_CODE);
@ -299,7 +311,7 @@ int TInstaller_mask::precheck_modules(bool only_newer)
if (chk && only_newer && cod_module == "sy") //se viene checkato il modulo sy (sistema) deve togliere..
{ //..la possibilita' di installare altri moduli..
for (int i = 0; i < array.items(); i++)
for (int i = 0; i < a.items(); i++)
disable_row(i); //disabilita tutte le righe dello sheet
disable(DLG_USER);
check_enabled = false; //..ed uscire

View File

@ -20,6 +20,11 @@ struct TAFile_info : public TObject
int _last_disk;
};
bool is_real_floppy(const TFilename& path)
{
return (path[0] == 'A' || path[0] == 'B') && xvt_fsys_is_removable_drive(path);
}
///////////////////////////////////////////////////////////
// Archiving mask
///////////////////////////////////////////////////////////
@ -35,14 +40,14 @@ public:
TArchive_mask::TArchive_mask() : TAutomask("ba2200")
{
TList_field& lf = (TList_field&)field(F_FLOPPY);
TList_field& lf = lfield(F_FLOPPY);
TToken_string codes, values;
TString4 str;
int k = 0;
for (int d = 0; d < 26; d++)
{
str.format("%c:", 'A'+d);
const bool isrem = d < 2 && xvt_fsys_is_removable_drive(str) != 0;
const bool isrem = xvt_fsys_is_removable_drive(str) != 0;
const bool isfix = !isrem && xvt_fsys_is_fixed_drive(str);
const bool isnet = !isrem && !isfix && xvt_fsys_is_network_drive(str);
if (isrem || isfix || isnet)
@ -50,7 +55,7 @@ TArchive_mask::TArchive_mask() : TAutomask("ba2200")
codes.add(str);
values.add(str);
TToken_string& message = *lf.message(k++, TRUE);
if (isrem && str[0]<='B')
if (isrem && is_real_floppy(str))
message.format("DISABLE,%d", F_PATH);
else
message.format("ENABLE,%d", F_PATH);
@ -248,11 +253,6 @@ bool TArchive_app::can_save_as(const TFilename& src, const TFilename& dst) const
return xvt_fsys_test_disk_free_space(dst.left(3), s) != 0;
}
bool TArchive_app::is_real_floppy(const TFilename& path) const
{
return (path[0] == 'A' || path[0] == 'B') && xvt_fsys_is_removable_drive(path);
}
void TArchive_app::save_zip_files(const TFilename& floppy_path, const TString& desc, unsigned long max_chunk)
{
// Assegna un disco di destinazione a tutti i files

View File

@ -18,8 +18,6 @@ protected:
virtual void main_loop();
KEY query(int& mode, long& firm, TFilename& floppy_path, TString& desc) const;
bool is_real_floppy(const TFilename& path) const;
bool split_file(const TFilename& archive, unsigned long max_chunk);
bool zip_dir(const TFilename& name, unsigned long max_chunk);

View File

@ -1,7 +1,12 @@
#define F_HOST 201
#define F_NAME 202
#define F_LIST 203
#define F_HOST 201
#define F_NAME 202
#define F_LIST 203
#define F_USER 101
#define F_FILE 102
#define F_CERT 103
#define F_USER 101
#define F_FILE 102
#define F_CERT 103
#define F_TSA_URI 104
#define F_TSA_USER 105
#define F_TSA_PWD 106
#define F_TSA_POLICY 107
#define F_TSA_CODING 108

View File

@ -34,33 +34,76 @@ SPREADSHEET F_LIST
BEGIN
PROMPT 0 3 ""
ITEM "Utente@16"
ITEM "File certificato o DLL@60"
ITEM "Nome certificato@32"
ITEM "File certificato o DLL@40"
ITEM "Num.@4"
ITEM "URI TSA@40"
ITEM "Utente TSA@16"
ITEM "Password TSA@16"
ITEM "Policy TSA@40"
ITEM "Coding TSA"
END
ENDPAGE
ENDMASK
PAGE "Parametri" -1 -1 78 6
PAGE "Parametri" -1 -1 65 8
GROUPBOX DLG_NULL 63 4
BEGIN
PROMPT 1 0 "@bIdentita'"
END
STRING F_USER 32 16
BEGIN
PROMPT 1 1 "Utente "
PROMPT 2 1 "Utente "
CHECKTYPE REQUIRED
END
STRING F_FILE 260 40
STRING F_FILE 260 42
BEGIN
PROMPT 1 2 "File PFX o DLL "
PROMPT 2 2 "File PFX o DLL "
CHECKTYPE REQUIRED
FSELECT "*"
FLAGS "M"
END
STRING F_CERT 80 40
NUMBER F_CERT 4
BEGIN
PROMPT 1 3 "Certificato "
PROMPT 43 1 "Certificato "
END
GROUPBOX DLG_NULL 67 5
BEGIN
PROMPT 1 4 "@bMarcatura temporale (Time Stamp Authority)"
END
STRING F_TSA_URI 260 54
BEGIN
PROMPT 2 5 "URI "
END
STRING F_TSA_USER 16
BEGIN
PROMPT 2 6 "Utente "
END
STRING F_TSA_PWD 16
BEGIN
PROMPT 38 6 "Password "
END
STRING F_TSA_POLICY 16
BEGIN
PROMPT 2 7 "Policy "
END
LIST F_TSA_CODING 6
BEGIN
PROMPT 38 7 "Coding "
ITEM "|"
ITEM "binary|binary"
ITEM "base64|base64"
END
ENDPAGE