diff options
author | Ivo Hinkelmann <ihi@openoffice.org> | 2006-08-01 10:15:47 +0000 |
---|---|---|
committer | Ivo Hinkelmann <ihi@openoffice.org> | 2006-08-01 10:15:47 +0000 |
commit | 9e9e5cd09cf5ef744fc966198070361fa2687796 (patch) | |
tree | bee93d891722631f51938fe1cb4cda5d03dece62 /svtools | |
parent | 279e062388661ea32c565b8531d54c05e42cac02 (diff) |
INTEGRATION: CWS fwk40 (1.5.240); FILE MERGED
2006/06/30 13:34:53 mav 1.5.240.3: RESYNC: (1.5-1.6); FILE MERGED
2006/05/29 14:29:56 mav 1.5.240.2: #i64621# integrate patch
2006/05/29 14:25:43 mav 1.5.240.1: #i64621# integrate patch
Diffstat (limited to 'svtools')
-rw-r--r-- | svtools/source/fsstor/fsstorage.cxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/svtools/source/fsstor/fsstorage.cxx b/svtools/source/fsstor/fsstorage.cxx index b1c6aee804e8..90e403cae56b 100644 --- a/svtools/source/fsstor/fsstorage.cxx +++ b/svtools/source/fsstor/fsstorage.cxx @@ -4,9 +4,9 @@ * * $RCSfile: fsstorage.cxx,v $ * - * $Revision: 1.6 $ + * $Revision: 1.7 $ * - * last change: $Author: hr $ $Date: 2006-06-19 21:09:29 $ + * last change: $Author: ihi $ $Date: 2006-08-01 11:15:47 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -671,10 +671,10 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement( INetURLObject aFolderURL( m_pImpl->m_aURL ); aFolderURL.Append( aStorName ); - if ( ::utl::UCBContentHelper::IsDocument( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) + sal_Bool bFolderExists = ::utl::UCBContentHelper::IsFolder( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ); + if ( !bFolderExists && ::utl::UCBContentHelper::IsDocument( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) throw io::IOException(); // TODO: - sal_Bool bFolderExists = ::utl::UCBContentHelper::IsFolder( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ); if ( ( nStorageMode & embed::ElementModes::NOCREATE ) && !bFolderExists ) throw io::IOException(); // TODO: @@ -687,15 +687,19 @@ uno::Reference< embed::XStorage > SAL_CALL FSStorage::openStorageElement( if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) && bFolderExists ) { ::utl::UCBContentHelper::Kill( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ); - MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), sal_True ); // TODO: not atomar :( + bFolderExists = + MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), sal_True ); // TODO: not atomar :( } else if ( !bFolderExists ) - MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), sal_True ); // TODO: not atomar :( + { + bFolderExists = + MakeFolderNoUI( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), sal_True ); // TODO: not atomar :( + } } else if ( ( nStorageMode & embed::ElementModes::TRUNCATE ) ) throw io::IOException(); // TODO: access denied - if ( !::utl::UCBContentHelper::IsFolder( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ) ) ) + if ( !bFolderExists ) throw io::IOException(); // there is no such folder ::ucb::Content aResultContent( aFolderURL.GetMainURL( INetURLObject::NO_DECODE ), xDummyEnv ); |