From fa314082a89f917912dd2e610ac19991b84921fa Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Thu, 21 Nov 2019 15:00:48 +0100 Subject: tdf#128598: Drop dubious file: -> smb: conversion completely As discussed in the commit message of 46c645bf4e9909f5296e75028f1f5434e83942d2 "Move dubious file: -> smb: conversion from INetURLObject to file UCP", it is unclear why exactly file:/// URLs should be retried as smb URLs on Linux. That commit had tried to keep that dubious feature alive with a different hack, but tdf#128598 "FILEOPEN: Certain syntax of opening file from samba share results in Document in Use dialog" demonstrates that that hack doesn't work well either (see libreoffice-6-4 "tdf#128598: Revert 'Move dubious file: -> smb: conversion from..." for further details). So just drop the dubious (mis-)feature entirely from LO 6.5. On Linux, use GIO's smb URLs to access Windows SMB shares, just like you would use e.g. GIO's afp URLs to access AppleTalk resources. Change-Id: I2ad53f508919a5f581e3afc4c4a5d26461b8ed2b Reviewed-on: https://gerrit.libreoffice.org/83402 Tested-by: Jenkins Reviewed-by: Stephan Bergmann --- ucb/source/ucp/file/prov.cxx | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/ucb/source/ucp/file/prov.cxx b/ucb/source/ucp/file/prov.cxx index 7c5c66e23e6e..937487e749cc 100644 --- a/ucb/source/ucp/file/prov.cxx +++ b/ucb/source/ucp/file/prov.cxx @@ -20,8 +20,6 @@ #include #include #include -#include -#include #include #include #include @@ -171,21 +169,6 @@ FileProvider::queryContent( if( err ) { - // Hack to retry file:///... URLs as smb URLs: - INetURLObject url(xIdentifier->getContentIdentifier()); - if (url.GetProtocol() == INetProtocol::File - && !url.GetHost(INetURLObject::DecodeMechanism::NONE).isEmpty()) - { - url.changeScheme(INetProtocol::Smb); - ucbhelper::Content content; - if (ucbhelper::Content::create( - url.GetMainURL(INetURLObject::DecodeMechanism::NONE), - css::uno::Reference(), m_xContext, content)) - { - return content.get(); - } - } - throw IllegalIdentifierException( THROW_WHERE ); } -- cgit