Patch level : 12.00 139

Files correlati     : ve01.exe ve11.exe fp01.exe cg021.exe
Commento                :
Invio con FePA
This commit is contained in:
Alessandro Bonazzi 2025-07-27 19:33:31 +02:00
parent 1589b5aecd
commit f78c0c2121
2 changed files with 27 additions and 29 deletions

View File

@ -796,38 +796,36 @@ void TApplication::open_files(int logicnum, ...)
bool TApplication::get_spotlite_path(TFilename& path) const bool TApplication::get_spotlite_path(TFilename& path) const
{ {
bool ok = dongle().active(RSAUT); bool ok = false;
if (ok)
if (prefix_valid())
path = prefix().get_studio(); // Legge il persorso dello studio corrente
else
path = ini_get_string(CONFIG_INSTALL, "Main", "Study");
const TString80 study = path.name(); // Estrae il nome dello studio (senza percorso)
path.add("spotlite"); // Crea il nome standard della cartella per gli archivi
ok = path.exist(); // Controlla se esiste gia'
if (!ok)
{ {
if (prefix_valid()) make_dir("servers"); // Assicuiramoci che esista la cartella servers
path = prefix().get_studio(); // Legge il persorso dello studio corrente TConfig ini("servers/servers.ini", "Spotlite");
else for (int i = 0; ; i++)
path = ini_get_string(CONFIG_INSTALL, "Main", "Study");
const TString80 study = path.name(); // Estrae il nome dello studio (senza percorso)
path.add("spotlite"); // Crea il nome standard della cartella per gli archivi
ok = path.exist(); // Controlla se esiste gia'
if (!ok)
{ {
make_dir("servers"); // Assicuiramoci che esista la cartella servers const TString& s = ini.get("Study", NULL, i);
TConfig ini("servers/servers.ini", "Spotlite"); if (s.blank()) // NON e' mai stato configurato
for (int i = 0; ; i++)
{ {
const TString& s = ini.get("Study", NULL, i); ini.set("Study", study, NULL, TRUE, i);
if (s.blank()) // NON e' mai stato configurato ini.set("Data", path, NULL, TRUE, i);
ok = make_dir(path);
break;
}
else
{
if (s.compare(study, -1, true) == 0) // E' gia' configurato
{ {
ini.set("Study", study, NULL, TRUE, i); path = ini.get("Data", NULL, i);
ini.set("Data", path, NULL, TRUE, i); ok = path.exist();
ok = make_dir(path); break;
break;
}
else
{
if (s.compare(study, -1, true) == 0) // E' gia' configurato
{
path = ini.get("Data", NULL, i);
ok = path.exist();
break;
}
} }
} }
} }

View File

@ -2421,7 +2421,7 @@ bool TBook::print(size_t pagefrom, size_t pageto, word copies)
bool TBook::export_pdf(TFilename& filename, bool signature, bool goto_url, bool ask_filename) bool TBook::export_pdf(TFilename& filename, bool signature, bool goto_url, bool ask_filename)
{ {
bool ok = (pages() > 0) && main_app().has_module(RSAUT); // Controllo paranoico dei permessi bool ok = (pages() > 0); // Controllo paranoico dei permessi
if (ok) if (ok)
{ {
ask_filename |= filename.blank(); ask_filename |= filename.blank();