deleted check fot the existence of generated script in testFirewall - it was redundant b/c we get error when we try to open it to read manifest.

This commit is contained in:
SVN User
2008-10-09 06:14:08 +00:00
parent 2ed50c8c4a
commit 654674c619
3 changed files with 7 additions and 33 deletions
+1 -1
View File
@@ -1 +1 @@
#define BUILD_NUM 584
#define BUILD_NUM 586
+1 -1
View File
@@ -115,7 +115,7 @@ void FirewallInstaller::packSCPArgs(const QString &file_name,
if (!cnf->user.isEmpty() && scp.toLower().indexOf("pscp.exe")!=-1)
{
args.push_back("-ssh");
// args.push_back("-ssh");
args.push_back("-pw");
args.push_back(cnf->pwd);
}
+5 -31
View File
@@ -356,17 +356,16 @@ QString instDialog::replaceMacrosInCommand(const QString &ocmd)
* and use only the file name for %FWSCRIPT%
*/
QString cmd = ocmd;
QString clean_conffile = cnf.conffile.section(QDir::separator(),-1);
QString fwbscript = QFileInfo(cnf.conffile).fileName();
if (fwbdebug)
{
qDebug("Macro substitutions:");
qDebug(QString(" cnf.conffile=%1").arg(cnf.conffile).toAscii().constData());
qDebug(QString(" %%FWSCRIPT%%=%1").arg(clean_conffile).toAscii().constData());
qDebug(QString(" %%FWDIR%%=%1").arg(cnf.fwdir).toAscii().constData());
qDebug(" cnf.conffile=%s", cnf.conffile.toAscii().constData());
qDebug(" %%FWSCRIPT%%=%s", fwbscript.toAscii().constData());
qDebug(" %%FWDIR%%=%s", cnf.fwdir.toAscii().constData());
}
cmd.replace("%FWSCRIPT%", clean_conffile);
cmd.replace("%FWSCRIPT%", fwbscript);
cmd.replace("%FWDIR%", cnf.fwdir);
cmd.replace("%FWBPROMPT%", fwb_prompt);
@@ -420,31 +419,6 @@ bool instDialog::testFirewall(Firewall *fw)
return false;
}
QString generated_file = FirewallInstaller::getGeneratedFileFullPath(fw);
if (fwbdebug)
qDebug("Seeking generated file %s",
generated_file.toLocal8Bit().constData());
// Note that compilers just take the name of the firewall from XML
// file and use that for the file name. So, if the object name in
// XML file is stored in Utf8, the file name will be composed in
// Utf8 regardless of the OS locale. The reason for this is that
// compilers should not depend on QT, so we don't have easy way to
// convert between encodings in compilers.
const char *generated_file_utf8 = generated_file.toUtf8().constData();
if (access(generated_file_utf8, R_OK))
{
/* need to recompile */
addToLog("\n");
addToLog(tr("Can not open generated firewall configuration file %1.\n"
"Recompile the firewall or check file permissions.\n")
.arg(QString(generated_file)));
if (fwbdebug) qDebug("Firewall isn't compiled.");
return false;
}
return true;
}