summaryrefslogtreecommitdiff
path: root/src/spawn.cpp
diff options
context:
space:
mode:
authorisanae <14251494+isanae@users.noreply.github.com>2021-01-10 23:08:07 -0500
committerisanae <14251494+isanae@users.noreply.github.com>2021-01-18 08:20:07 -0500
commitaa7a552654ba3b218b87397dedc9e5a66d2f6701 (patch)
treefc3807b35268f2c6b3d8297cd6d46ad065dae805 /src/spawn.cpp
parente4ae41e3a29fc3e4714e1c3f8c9f071768d17b68 (diff)
implemented exe command
better error when cwd doesn't exist
Diffstat (limited to 'src/spawn.cpp')
-rw-r--r--src/spawn.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/spawn.cpp b/src/spawn.cpp
index a9ecb61e..68526165 100644
--- a/src/spawn.cpp
+++ b/src/spawn.cpp
@@ -164,9 +164,14 @@ QString makeContent(const SpawnParameters& sp, DWORD code)
} else if (code == ERROR_FILE_NOT_FOUND) {
return QObject::tr("The file '%1' does not exist.")
.arg(QDir::toNativeSeparators(sp.binary.absoluteFilePath()));
- } else {
- return QString::fromStdWString(formatSystemMessage(code));
+ } else if (code == ERROR_DIRECTORY) {
+ if (!sp.currentDirectory.exists()) {
+ return QObject::tr("The working directory '%1' does not exist.")
+ .arg(QDir::toNativeSeparators(sp.currentDirectory.absolutePath()));
+ }
}
+
+ return QString::fromStdWString(formatSystemMessage(code));
}
QMessageBox::StandardButton badSteamReg(