mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 23:54:01 +00:00
3eb9b19d3b
Now that we keep only one version of Frameworks in Nixpkgs, it is not necessary to version the directory which stores the Nix expressions.
29 lines
964 B
Diff
29 lines
964 B
Diff
Index: kio-5.17.0/src/core/ksambashare.cpp
|
|
===================================================================
|
|
--- kio-5.17.0.orig/src/core/ksambashare.cpp
|
|
+++ kio-5.17.0/src/core/ksambashare.cpp
|
|
@@ -67,13 +67,18 @@ KSambaSharePrivate::~KSambaSharePrivate(
|
|
|
|
bool KSambaSharePrivate::isSambaInstalled()
|
|
{
|
|
- if (QFile::exists(QStringLiteral("/usr/sbin/smbd"))
|
|
- || QFile::exists(QStringLiteral("/usr/local/sbin/smbd"))) {
|
|
- return true;
|
|
+ const QByteArray pathEnv = qgetenv("PATH");
|
|
+ if (!pathEnv.isEmpty()) {
|
|
+ QLatin1Char pathSep(':');
|
|
+ QStringList paths = QFile::decodeName(pathEnv).split(pathSep, QString::SkipEmptyParts);
|
|
+ for (QStringList::iterator it = paths.begin(); it != paths.end(); ++it) {
|
|
+ it->append("/smbd");
|
|
+ if (QFile::exists(*it)) {
|
|
+ return true;
|
|
+ }
|
|
+ }
|
|
}
|
|
|
|
- //qDebug() << "Samba is not installed!";
|
|
-
|
|
return false;
|
|
}
|
|
|