summaryrefslogtreecommitdiff
path: root/src/mainwindow.cpp
diff options
context:
space:
mode:
authorTannin <devnull@localhost>2014-12-20 14:43:22 +0100
committerTannin <devnull@localhost>2014-12-20 14:43:22 +0100
commitee0041ba1845ab392926bfeaa9f6ae0caeadce1b (patch)
tree5e28187b9925e64cb5dd9e6bf07b850da427f512 /src/mainwindow.cpp
parent306ba78b0f40f70035cd25d306ab31b0c5230f8b (diff)
- bugfix: file extensions when adding executables were treated case sensitive
- exe files are now started directly, not through cmd
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r--src/mainwindow.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp
index e3a70ae6..7cc18f6b 100644
--- a/src/mainwindow.cpp
+++ b/src/mainwindow.cpp
@@ -4502,14 +4502,15 @@ int MainWindow::getBinaryExecuteInfo(const QFileInfo &targetInfo,
QFileInfo &binaryInfo, QString &arguments)
{
QString extension = targetInfo.completeSuffix();
- if ((extension == "exe") ||
- (extension == "cmd") ||
- (extension == "com") ||
- (extension == "bat")) {
+ if ((extension.compare("cmd", Qt::CaseInsensitive)) ||
+ (extension.compare("com", Qt::CaseInsensitive)) ||
+ (extension.compare("bat", Qt::CaseInsensitive))) {
binaryInfo = QFileInfo("C:\\Windows\\System32\\cmd.exe");
arguments = QString("/C \"%1\"").arg(QDir::toNativeSeparators(targetInfo.absoluteFilePath()));
return 1;
- } else if (extension == "jar") {
+ } else if (extension.compare("exe", Qt::CaseInsensitive) == 0) {
+ binaryInfo = targetInfo;
+ } else if (extension.compare("jar", Qt::CaseInsensitive) == 0) {
// types that need to be injected into
std::wstring targetPathW = ToWString(targetInfo.absoluteFilePath());
QString binaryPath;