diff options
Diffstat (limited to 'dbaccess/source/core/dataaccess/databasecontext.cxx')
-rw-r--r-- | dbaccess/source/core/dataaccess/databasecontext.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx index b2cc08996dbf..6b0509fbc174 100644 --- a/dbaccess/source/core/dataaccess/databasecontext.cxx +++ b/dbaccess/source/core/dataaccess/databasecontext.cxx @@ -368,7 +368,11 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa if (bEmbeddedDataSource) { // In this case the host contains the real path, and the path is the embedded stream name. - OUString sBaseURI = aURL.GetHost(INetURLObject::DecodeMechanism::WithCharset) + aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset); + OUString sBaseURI = + INetURLObject::encode(aURL.GetHost(INetURLObject::DecodeMechanism::WithCharset), + INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All) + + INetURLObject::encode(aURL.GetURLPath(INetURLObject::DecodeMechanism::WithCharset), + INetURLObject::PART_FPATH, INetURLObject::EncodeMechanism::All); aArgs.put("BaseURI", sBaseURI); } |