Patch level : 12.0 1096

Files correlati     : ba0.exe
Commento        :

COntrollata l'esistenza delle catelle temporanee nell'avvio del menù. Se non possono essere create il menù non parte.
This commit is contained in:
Alessandro Bonazzi 2021-11-24 11:41:30 +01:00
parent d8e2fd17cc
commit 1a2184724d

@ -1512,6 +1512,18 @@ bool TMenu_application::dongle_update_needed() const
bool TMenu_application::user_create()
{
TFilename dir;
if (xvt_sys_get_env("TEMP", dir.get_buffer(), dir.size()))
if (!dexist(dir) && !make_dir(dir))
return error_box(FR("La cartella temporanea %s definita dalla variabile d'ambiente TEMP\nnon esiste e non può essere creata."), (const char *)dir);
if (xvt_sys_get_env("TMP", dir.get_buffer(), dir.size()))
if (!dexist(dir) && !make_dir(dir))
return error_box(FR("La cartella temporanea %s definita dalla variabile d'ambiente TMP\nnon esiste e non può essere creata."), (const char *)dir);
dir.cut(0);
dir.tempdir();
if (!dexist(dir) && !make_dir(dir))
return error_box(FR("La cartella temporanea %s definita in campo.ini\nnon esiste e non può essere creata."), (const char *)dir);
disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora
disable_menu_item(M_FILE_PREVIEW); // Figuriamoci questa