From 654674c6192b8ed62e1e84ea0290cea0212c8800 Mon Sep 17 00:00:00 2001 From: SVN User Date: Thu, 9 Oct 2008 06:14:08 +0000 Subject: [PATCH] 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. --- build_num | 2 +- src/gui/FirewallInstaller.cpp | 2 +- src/gui/instDialog.cpp | 36 +++++------------------------------ 3 files changed, 7 insertions(+), 33 deletions(-) diff --git a/build_num b/build_num index 4b39b7502..1b05e7ebf 100644 --- a/build_num +++ b/build_num @@ -1 +1 @@ -#define BUILD_NUM 584 +#define BUILD_NUM 586 diff --git a/src/gui/FirewallInstaller.cpp b/src/gui/FirewallInstaller.cpp index 1a6768075..b28de4fd8 100644 --- a/src/gui/FirewallInstaller.cpp +++ b/src/gui/FirewallInstaller.cpp @@ -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); } diff --git a/src/gui/instDialog.cpp b/src/gui/instDialog.cpp index c479b6864..64c5e367c 100644 --- a/src/gui/instDialog.cpp +++ b/src/gui/instDialog.cpp @@ -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; }