summaryrefslogtreecommitdiff
path: root/package/source
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2014-01-16 16:15:10 +0100
committerDavid Tardon <dtardon@redhat.com>2014-01-16 16:39:59 +0100
commit28619201e92aea86a938dd57ed7f79c22d14d89c (patch)
treebc0989446cea1dc288c79da866c4fb28f6d26f6b /package/source
parent7d432a9e67076b862cbdfc16199d5a72664d28f5 (diff)
do not close input, unless it was us who opened it
Change-Id: I6ffedd1e64e48b4fc4bd6f5eb63e96b49f1a8508
Diffstat (limited to 'package/source')
-rw-r--r--package/source/zippackage/zipfileaccess.cxx4
1 files changed, 3 insertions, 1 deletions
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 17c5cf27b525..3139c10c526a 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -43,6 +43,7 @@ OZipFileAccess::OZipFileAccess( const uno::Reference< uno::XComponentContext >&
, m_pZipFile( NULL )
, m_pListenersContainer( NULL )
, m_bDisposed( sal_False )
+, m_bOwnContent( false )
{
if ( !rxContext.is() )
throw uno::RuntimeException(OSL_LOG_PREFIX, uno::Reference< uno::XInterface >() );
@@ -188,6 +189,7 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
if ( aContent.openStream ( xSink ) )
{
m_xContentStream = xSink->getInputStream();
+ m_bOwnContent = true;
xSeekable = uno::Reference< io::XSeekable >( m_xContentStream, uno::UNO_QUERY );
}
}
@@ -385,7 +387,7 @@ void SAL_CALL OZipFileAccess::dispose()
m_pZipFile = NULL;
}
- if ( m_xContentStream.is() )
+ if ( m_xContentStream.is() && m_bOwnContent )
try {
m_xContentStream->closeInput();
} catch( uno::Exception& )