Commit d69959e2 authored by Fabian Vogt's avatar Fabian Vogt

UDS_URL is not meant for links, Use UDS_TARGET_URL instead

The KIO documentation for UDS_URL says:
`use UDS_TARGET_URL if you want "links" to unrelated urls.`
So the use of UDS_URL here was probably wrong.
Switching to UDS_TARGET_URL fixes mounting of some slaves such as baloosearch,
which set UDS_URL to the URL of the entry itself for some reason.

BUG: 431079
parent a3d52b86
......@@ -1736,12 +1736,12 @@ std::shared_ptr<KIOFuseNode> KIOFuseVFS::createNodeFromUDSEntry(const KIO::UDSEn
attr.st_gid = gr->gr_gid;
if(entry.contains(KIO::UDSEntry::UDS_LOCAL_PATH) || entry.contains(KIO::UDSEntry::UDS_URL))
if(entry.contains(KIO::UDSEntry::UDS_LOCAL_PATH) || entry.contains(KIO::UDSEntry::UDS_TARGET_URL))
// Create as symlink if possible
QString target = entry.stringValue(KIO::UDSEntry::UDS_LOCAL_PATH);
target = QUrl(entry.stringValue(KIO::UDSEntry::UDS_URL)).toLocalFile();
target = QUrl(entry.stringValue(KIO::UDSEntry::UDS_TARGET_URL)).toLocalFile();
......@@ -1760,7 +1760,9 @@ std::shared_ptr<KIOFuseNode> KIOFuseVFS::createNodeFromUDSEntry(const KIO::UDSEn
attr.st_mode |= S_IFREG;
std::shared_ptr<KIOFuseRemoteFileNode> ret = nullptr;
const QUrl nodeUrl = QUrl{entry.stringValue(KIO::UDSEntry::UDS_URL)};
const QUrl nodeUrl = QUrl{entry.stringValue(KIO::UDSEntry::UDS_TARGET_URL)};
return nullptr;
if(m_useFileJob && KProtocolManager::supportsOpening(nodeUrl) && KProtocolManager::supportsTruncating(nodeUrl))
ret = std::make_shared<KIOFuseRemoteFileJobBasedFileNode>(parentIno, name, attr);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment