diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-06-15 00:29:33 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-06-15 00:29:33 +0200 |
commit | 4b7b2ffa6c17c5021856c41932c7a8dc4b714932 (patch) | |
tree | 3ff304ce1465f9b0773147f85ff32614b73cbba5 /mainwindow.cpp | |
parent | d2ca0d0aaafbce887b686633c8fc5323d4fb5aed (diff) | |
parent | 6bd4a1bf29616ed10101df2721f5b0875247f756 (diff) |
merged duplicate fix
Diffstat (limited to 'mainwindow.cpp')
-rw-r--r-- | mainwindow.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mainwindow.cpp b/mainwindow.cpp index 6eecc1f2..8de65646 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -394,13 +394,15 @@ void MainWindow::on_pushButton_clicked() QString MainWindow::getDir(const QModelIndex &index, bool forPass) { + QString abspath = QDir(passStore).absolutePath() + '/'; if (!index.isValid()) { - return forPass ? "" : passStore; + return forPass ? "" : abspath; } QFileInfo info = model.fileInfo(proxyModel.mapToSource(index)); QString filePath = (info.isFile() ? info.absolutePath() : info.absoluteFilePath()) + '/'; if (forPass) { filePath.replace(QRegExp("^" + passStore), ""); + filePath.replace(QRegExp("^" + abspath), ""); } return filePath; } @@ -454,10 +456,15 @@ void MainWindow::executePass(QString args, QString input) { * @param args */ void MainWindow::executeWrapper(QString app, QString args, QString input) { + // Happens a lot if e.g. git binary is not set. + // This will result in bogus "QProcess::FailedToStart" messages, + // also hiding legitimate errors from the gpg commands. if (app.isEmpty()) { qDebug() << "Trying to execute nothing.."; return; } + // Convert to absolute path, just in case + app = QDir(QCoreApplication::applicationDirPath()).absoluteFilePath(app); if (wrapperRunning) { execQueueItem item; item.app = app; |