Group :: Graphical desktop/KDE
RPM: kde5-kio-zeroconf
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: alt-zeroconf-autonet.patch
Download
Download
--- a/kioworker/dnssd.cpp
+++ b/kioworker/dnssd.cpp
@@ -28,7 +28,7 @@
// Qt
#include <QCoreApplication>
#include <qplatformdefs.h> // S_IFDIR
-
+#include <QFileInfo>
class KIOPluginForMetaData : public QObject
{
@@ -49,8 +49,26 @@ void ProtocolData::feedUrl( QUrl* url, c
if (!pathEntry.isNull())
url->setPath( QString::fromUtf8(serviceTextData[pathEntry]) );
+ bool autonfs = false;
+ if( protocol == QStringLiteral("nfs") )
+ {
+ QString nfspath = QLatin1String("/mnt/net/") + remoteService->serviceName();
+ QFileInfo nfsinfo( nfspath );
+ if( nfsinfo.exists() )
+ {
+ autonfs = true;
+ url->setScheme( QStringLiteral("") );
+ url->setHost( QStringLiteral("") );
+ url->setPort( -1 );
+ url->setPath( nfspath );
+ }
+ }
+
+ if( !autonfs )
+ {
url->setHost( remoteService->hostName() );
url->setPort( remoteService->port() );
+ }
}