Corretta la gestione dei nomi degli split
git-svn-id: svn://10.65.10.50/trunk@5746 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
cff0ac49f4
commit
9b3aa2b06a
@ -533,7 +533,7 @@ void TModule_mask::save()
|
|||||||
sub << module << '1';
|
sub << module << '1';
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (isdigit(sub[0]))
|
if (isdigit(sub[0]) && sub[1]=='\0')
|
||||||
{
|
{
|
||||||
sub.insert(module, 0);
|
sub.insert(module, 0);
|
||||||
sub.cut(3);
|
sub.cut(3);
|
||||||
@ -738,13 +738,13 @@ void TFascicolator_mask::load()
|
|||||||
const TString& module = *riga;
|
const TString& module = *riga;
|
||||||
if (module[0] == '_' || module.len() == 2)
|
if (module[0] == '_' || module.len() == 2)
|
||||||
{
|
{
|
||||||
TToken_string& row = s.row(m);
|
TToken_string& row = s.row(-1);
|
||||||
ini.set_paragraph(module);
|
ini.set_paragraph(module);
|
||||||
row = ini.get("Descrizione");
|
row = ini.get("Descrizione");
|
||||||
|
|
||||||
if (module[0] == '_')
|
if (module[0] == '_')
|
||||||
{
|
{
|
||||||
s.disable_cell(m-1, -1);
|
s.disable_cell(s.items()-1, -1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -814,7 +814,7 @@ bool TFascicolator_mask::zip_file(const char* archive, const char* file) const
|
|||||||
{
|
{
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
TFilename cmd;
|
TFilename cmd;
|
||||||
cmd << "zip.pif " << archive << ' ' << file;
|
cmd << "zip.pif " << " -9 " << archive << ' ' << file;
|
||||||
TExternal_app app(cmd);
|
TExternal_app app(cmd);
|
||||||
int err = app.run(FALSE, FALSE, FALSE, FALSE);
|
int err = app.run(FALSE, FALSE, FALSE, FALSE);
|
||||||
return err == 0;
|
return err == 0;
|
||||||
@ -866,7 +866,7 @@ bool TFascicolator_mask::move_file(const TFilename& file, const char* dir) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!yesno_box("Errore di scrittura del file %s.\nSi desidera riprovare?",
|
if (!yesno_box("Errore di scrittura del file %s.\nSi desidera riprovare?",
|
||||||
(const char*)file));
|
(const char*)file))
|
||||||
user_abort = TRUE;
|
user_abort = TRUE;
|
||||||
}
|
}
|
||||||
} while (!write_ok && !user_abort);
|
} while (!write_ok && !user_abort);
|
||||||
@ -894,7 +894,7 @@ int TFascicolator_mask::split_file(const TFilename& archive, long size) const
|
|||||||
TFilename cmd;
|
TFilename cmd;
|
||||||
xvt_fsys_convert_dir_to_str(&curdir, cmd.get_buffer(), cmd.size());
|
xvt_fsys_convert_dir_to_str(&curdir, cmd.get_buffer(), cmd.size());
|
||||||
cmd.add("zipsplit.pif");
|
cmd.add("zipsplit.pif");
|
||||||
cmd << " -n " << size << " " << archive;
|
cmd << " -n " << size << " " << " -b " << archive.path() << " " << archive;
|
||||||
|
|
||||||
// Salta alla directory temporanea
|
// Salta alla directory temporanea
|
||||||
xvt_fsys_convert_str_to_dir((char*)archive.path(), &tmpdir);
|
xvt_fsys_convert_str_to_dir((char*)archive.path(), &tmpdir);
|
||||||
@ -924,6 +924,14 @@ int TFascicolator_mask::split_file(const TFilename& archive, long size) const
|
|||||||
}
|
}
|
||||||
::remove(archive);
|
::remove(archive);
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TFilename archive1(archive);
|
||||||
|
archive1.ext("");
|
||||||
|
archive1 << '1';
|
||||||
|
archive1.ext("zip");
|
||||||
|
::rename(archive,archive1);
|
||||||
|
}
|
||||||
|
|
||||||
return disks;
|
return disks;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user