desktop/source/deployment/misc/dp_descriptioninfoset.cxx | 10 ++++++---- ucb/source/ucp/file/filglob.cxx | 3 +++ 2 files changed, 9 insertions(+), 4 deletions(-)
New commits: commit bd5da80befbd1f7f09aadf4b02122414c010d65b Author: Stephan Bergmann <sberg...@redhat.com> Date: Wed May 2 18:25:28 2012 +0200 Handle cases where ExtensionDescription is called on nonexisting path ...which happens when installing non-bundle extensions (like a plain .xcu file), where the path computed for the description.xml contains the path to the non-bundle extension file itself as a prefix, so access results in E_NOTDIR. Change-Id: Ic0f4a34b46d99d1817ceea599bb8b53dbd65bc49 diff --git a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx index 14cf7b1..1a5a43a 100644 --- a/desktop/source/deployment/misc/dp_descriptioninfoset.cxx +++ b/desktop/source/deployment/misc/dp_descriptioninfoset.cxx @@ -49,7 +49,7 @@ #include "com/sun/star/xml/dom/XNodeList.hpp" #include "com/sun/star/xml/dom/XDocumentBuilder.hpp" #include "com/sun/star/xml/xpath/XXPathAPI.hpp" -#include "com/sun/star/ucb/InteractiveAugmentedIOException.hpp" +#include "com/sun/star/ucb/InteractiveIOException.hpp" #include "cppuhelper/implbase1.hxx" #include "cppuhelper/implbase2.hxx" #include "cppuhelper/weak.hxx" @@ -206,7 +206,7 @@ ExtensionDescription::ExtensionDescription( //throws an com::sun::star::uno::Exception if the file is not available Reference<css::io::XInputStream> xIn; try - { //throws com.sun.star.ucb.InteractiveAugmentedIOException + { //throws com.sun.star.ucb.InteractiveIOException xIn = descContent.openStream(); } catch ( const css::uno::Exception& ) @@ -318,8 +318,10 @@ void FileDoesNotExistFilter::handle( { css::uno::Any request( xRequest->getRequest() ); - css::ucb::InteractiveAugmentedIOException ioexc; - if ((request>>= ioexc) && ioexc.Code == css::ucb::IOErrorCode_NOT_EXISTING ) + css::ucb::InteractiveIOException ioexc; + if ((request>>= ioexc) + && (ioexc.Code == css::ucb::IOErrorCode_NOT_EXISTING + || ioexc.Code == css::ucb::IOErrorCode_NOT_EXISTING_PATH)) { m_bExist = false; return; diff --git a/ucb/source/ucp/file/filglob.cxx b/ucb/source/ucp/file/filglob.cxx index a6176cc..bab84d6 100644 --- a/ucb/source/ucp/file/filglob.cxx +++ b/ucb/source/ucp/file/filglob.cxx @@ -323,6 +323,9 @@ namespace fileaccess { // No such device ioErrorCode = IOErrorCode_INVALID_DEVICE; break; + case FileBase::E_NOTDIR: + ioErrorCode = IOErrorCode_NOT_EXISTING_PATH; + break; case FileBase::E_NOENT: // No such file or directory ioErrorCode = IOErrorCode_NOT_EXISTING; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits