[Libreoffice-commits] core.git: ucb/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Thu Nov 21 16:18:04 UTC 2019
ucb/source/ucp/file/prov.cxx | 17 -----------------
1 file changed, 17 deletions(-)
New commits:
commit fa314082a89f917912dd2e610ac19991b84921fa
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Thu Nov 21 15:00:48 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Thu Nov 21 17:16:37 2019 +0100
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://<host>/ 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 <https://gerrit.libreoffice.org/#/c/83396/>
"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 <sbergman at redhat.com>
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 <osl/security.hxx>
#include <osl/file.hxx>
#include <osl/socket.h>
-#include <tools/urlobj.hxx>
-#include <ucbhelper/content.hxx>
#include <cppuhelper/queryinterface.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/PropertyAttribute.hpp>
@@ -171,21 +169,6 @@ FileProvider::queryContent(
if( err )
{
- // Hack to retry file://<host>/... 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<css::ucb::XCommandEnvironment>(), m_xContext, content))
- {
- return content.get();
- }
- }
-
throw IllegalIdentifierException( THROW_WHERE );
}
More information about the Libreoffice-commits
mailing list