Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37886954
en ru br
ALT Linux repos
S:23.04.3-alt1

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


--- 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() );
+    }
 }
 
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin