Patch level : 2.0 588

Files correlati     : xvaga.dll
Ricompilazione Demo : [ ]
Commento            :

Corretto supporto per file zippati contenenti sotto-cartelle.
Serve per gestire i file di help in html


git-svn-id: svn://10.65.10.50/trunk@11463 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2003-10-03 11:01:47 +00:00
parent 3f78121948
commit ea04082549
2 changed files with 25 additions and 13 deletions

View File

@ -99,6 +99,17 @@ bool aga_unzip(const char* zipfile, const char* destdir)
for (unsigned int f = 0; f < files; f++)
{
const wxString& strFileName = aFiles[f];
if (wxEndsWithPathSeparator(strFileName)) // Is dir name
{
wxString strOutDir = destdir;
if (!wxEndsWithPathSeparator(strOutDir))
strOutDir += wxFILE_SEP_PATH;
strOutDir += strFileName;
if (!::wxDirExists(strOutDir))
::wxMkdir(strOutDir);
}
else
{
wxZipInputStream fin(zipfile, strFileName);
wxString strOutFile = destdir;
@ -113,6 +124,7 @@ bool aga_unzip(const char* zipfile, const char* destdir)
wxFileOutputStream fout(strOutFile);
fout.Write(fin);
}
}
return files > 0;
}

View File

@ -2474,7 +2474,7 @@ BOOLEAN xvt_fsys_build_pathname(char *mbs, const char *volname, const char *dirn
strcpy(mbs, dirname);
if (leafroot && *leafroot)
{
if (*leafroot != '/' && *leafroot != '\\')
if (!wxEndsWithPathSeparator(mbs) && !wxIsPathSeparator(*leafroot))
strcat(mbs, "/");
strcat(mbs, leafroot);
}