Change in kio[master]: Fix check for missing `kioslave` executable
Jan Kundrát (Code Review)
noreply at kde.org
Sat Dec 6 16:31:52 UTC 2014
Jan Kundrát has uploaded a new change for review.
https://gerrit.vesnicky.cesnet.cz/r/202
Change subject: Fix check for missing `kioslave` executable
......................................................................
Fix check for missing `kioslave` executable
The old version checked a string which is guaranteed to never be empty
for being empty. It's better to check whether that file is actually an
executable file.
Change-Id: If4c0417a5f514b4232a0b3a57ad40d49724f9cfe
---
M src/core/slave.cpp
1 file changed, 3 insertions(+), 2 deletions(-)
git pull ssh://gerrit.vesnicky.cesnet.cz:29418/kio refs/changes/02/202/1
diff --git a/src/core/slave.cpp b/src/core/slave.cpp
index 2aed27c..57dc464 100644
--- a/src/core/slave.cpp
+++ b/src/core/slave.cpp
@@ -479,8 +479,9 @@
//qDebug() << "kioslave" << ", " << lib_path << ", " << protocol << ", " << QString() << ", " << slaveAddress;
const QString kioslave = CMAKE_INSTALL_FULL_LIBEXECDIR_KF5 "/kioslave";
- if (kioslave.isEmpty()) {
- error_text = i18n("Can not find 'kioslave' executable");
+ QFileInfo kioslaveInfo(kioslave);
+ if (!kioslaveInfo.exists() || !kioslaveInfo.isFile() || !kioslaveInfo.isExecutable()) {
+ error_text = i18n("Can not find 'kioslave' executable at '%1'", CMAKE_INSTALL_FULL_LIBEXECDIR_KF5);
error = KIO::ERR_CANNOT_LAUNCH_PROCESS;
delete slave;
return 0;
--
To view, visit https://gerrit.vesnicky.cesnet.cz/r/202
To unsubscribe, visit https://gerrit.vesnicky.cesnet.cz/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If4c0417a5f514b4232a0b3a57ad40d49724f9cfe
Gerrit-PatchSet: 1
Gerrit-Project: kio
Gerrit-Branch: master
Gerrit-Owner: Jan Kundrát <jkt at kde.org>
Gerrit-Reviewer: David Faure <faure at kde.org>
More information about the Kde-frameworks-devel
mailing list