fixed stripping of thumbs.db, better error reporting
This commit is contained in:
@@ -184,7 +184,7 @@ void CSMPackageInstallDlg::OnOK()
|
||||
}
|
||||
catch (CException* e)
|
||||
{
|
||||
AfxMessageBox( "Error extracting files", MB_ICONSTOP );
|
||||
e->ReportError();
|
||||
e->Delete();
|
||||
exit( 1 );
|
||||
}
|
||||
|
||||
@@ -88,6 +88,12 @@ BOOL CSmpackageApp::InitInstance()
|
||||
// test to see if this is a smzip file
|
||||
if( sPathLower.Right(3) == "zip" )
|
||||
{
|
||||
if( !DoesFileExist(sPath) )
|
||||
{
|
||||
AfxMessageBox( ssprintf("The file '%s' does not exist. Aborting installation.",sPath), MB_ICONERROR );
|
||||
exit(0);
|
||||
}
|
||||
|
||||
// We found a zip package. Prompt the user to install it!
|
||||
CSMPackageInstallDlg dlg( sPath );
|
||||
int nResponse = dlg.DoModal();
|
||||
|
||||
@@ -274,9 +274,9 @@ bool ExportPackage( CString sPackageName, const CStringArray& asDirectoriesToExp
|
||||
// don't export "thumbs.db" files or "CVS" folders
|
||||
CString sDir, sFName, sExt;
|
||||
splitrelpath( sFilePath, sDir, sFName, sExt );
|
||||
if( 0==stricmp(sFName,"thumbs.db") )
|
||||
if( sFName.CompareNoCase("thumbs.db")==0 )
|
||||
continue; // skip
|
||||
if( 0==stricmp(sFName,"CVS") )
|
||||
if( sFName.CompareNoCase("thumbs.db")==0 )
|
||||
continue; // skip
|
||||
|
||||
try
|
||||
|
||||
Reference in New Issue
Block a user