Patch level :2.0 470
Files correlati :librerie e ve5.exe Ricompilazione Demo : [ ] Commento : AO20012 Una volta che si lancia l'invio dei documenti a dischetto restituisce il messaggio: Compressione degli archivi errata o incompleta, e non invia nulla. git-svn-id: svn://10.65.10.50/trunk@11148 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
ab1a9de76b
commit
9ec1904c76
@ -336,9 +336,14 @@ bool TArchive::zip(
|
|||||||
// @comm Il parametro <p pr_set> e' utilizzato per evitare errori di riaperture di files.
|
// @comm Il parametro <p pr_set> e' utilizzato per evitare errori di riaperture di files.
|
||||||
|
|
||||||
{
|
{
|
||||||
const TString16 old(prefix().name());
|
safely_close_closeable_isamfiles();
|
||||||
prefix().set(NULL);
|
|
||||||
|
DIRECTORY currdir, newdir;
|
||||||
|
xvt_fsys_get_dir( &currdir); //memorizza la directory dove e'
|
||||||
|
|
||||||
|
xvt_fsys_convert_str_to_dir(dir, &newdir); //converte il nome della directory
|
||||||
|
xvt_fsys_set_dir( &newdir); //passa alla directory dir che gli viene passata
|
||||||
|
|
||||||
const TFilename workdir = dir;
|
const TFilename workdir = dir;
|
||||||
const TString name = workdir.name();
|
const TString name = workdir.name();
|
||||||
|
|
||||||
@ -348,20 +353,27 @@ bool TArchive::zip(
|
|||||||
TString title("Archiviazione di "); title << workdir;
|
TString title("Archiviazione di "); title << workdir;
|
||||||
TIndwin waitw(100,title,FALSE,FALSE);
|
TIndwin waitw(100,title,FALSE,FALSE);
|
||||||
TWait_cursor hourglass;
|
TWait_cursor hourglass;
|
||||||
|
|
||||||
|
TString_array filenames;
|
||||||
|
list_files("*.*", filenames);
|
||||||
|
|
||||||
// Crea il file con la lista dei file da comprimere
|
// Crea il file con la lista dei file da comprimere
|
||||||
const char* const ZIPLIST = "ziplist.txt";
|
const char* const ZIPLIST = "ziplist.txt";
|
||||||
FILE* flist = fopen(ZIPLIST, "w");
|
FILE* flist = fopen(ZIPLIST, "w");
|
||||||
fprintf(flist, "*.*");
|
|
||||||
|
FOR_EACH_ARRAY_ROW(filenames, r, row)
|
||||||
|
fprintf(flist, "%s\n",(const char *)*row);
|
||||||
|
|
||||||
fclose(flist);
|
fclose(flist);
|
||||||
|
|
||||||
bool ok = ::aga_zip_filelist(ZIPLIST, work);
|
bool ok = ::aga_zip_filelist(ZIPLIST, work);
|
||||||
|
|
||||||
|
xvt_fsys_set_dir( &currdir); //torna a posizionarsi nella directory iniziale
|
||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
ok = fsplit_zip(work, floppy, desc);
|
ok = fsplit_zip(work, floppy, desc);
|
||||||
else
|
else
|
||||||
error_box("Compressione degli archivi errata o incompleta");
|
error_box("Compressione degli archivi errata o incompleta");
|
||||||
|
|
||||||
prefix().set(old);
|
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
@ -425,8 +437,7 @@ bool TArchive::unzip(
|
|||||||
TString title("Ripristino di "); title << output;
|
TString title("Ripristino di "); title << output;
|
||||||
TIndwin waitw(100,title,FALSE,FALSE);
|
TIndwin waitw(100,title,FALSE,FALSE);
|
||||||
|
|
||||||
const TString16 old(prefix().name());
|
safely_close_closeable_isamfiles();
|
||||||
prefix().set(NULL);
|
|
||||||
|
|
||||||
TFilename cfg;
|
TFilename cfg;
|
||||||
cfg << floppy << ':';
|
cfg << floppy << ':';
|
||||||
@ -468,8 +479,6 @@ bool TArchive::unzip(
|
|||||||
ok = ::aga_unzip(restored, work);
|
ok = ::aga_unzip(restored, work);
|
||||||
else
|
else
|
||||||
error_box("Il file %s non è stato ripristinato completamente", (const char*)restored);
|
error_box("Il file %s non è stato ripristinato completamente", (const char*)restored);
|
||||||
|
|
||||||
prefix().set(old);
|
|
||||||
|
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user