diff options
author | Mathias Bauer <mba@openoffice.org> | 2001-11-27 10:03:52 +0000 |
---|---|---|
committer | Mathias Bauer <mba@openoffice.org> | 2001-11-27 10:03:52 +0000 |
commit | 7e0c9acedd3a633d8f955a3f5f055ca1b32d24b8 (patch) | |
tree | 292f6e6c1ac161742da117a555da96f4a26edb7c /unotools | |
parent | 2578834b69e12537692522115cfbb8e88783a556 (diff) |
#92987#: handle case of already existing folder
Diffstat (limited to 'unotools')
-rw-r--r-- | unotools/source/ucbhelper/ucbhelper.cxx | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/unotools/source/ucbhelper/ucbhelper.cxx b/unotools/source/ucbhelper/ucbhelper.cxx index c916944d440d..217fcb6b5073 100644 --- a/unotools/source/ucbhelper/ucbhelper.cxx +++ b/unotools/source/ucbhelper/ucbhelper.cxx @@ -2,9 +2,9 @@ * * $RCSfile: ucbhelper.cxx,v $ * - * $Revision: 1.11 $ + * $Revision: 1.12 $ * - * last change: $Author: mba $ $Date: 2001-09-10 16:34:48 $ + * last change: $Author: mba $ $Date: 2001-11-27 11:03:52 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -112,6 +112,9 @@ #ifndef _COM_SUN_STAR_CONTAINER_XCHILD_HPP_ #include <com/sun/star/container/XChild.hpp> #endif +#ifndef _COM_SUN_STAR_UCB_INTERACTIVEIODEXCEPTION_HPP_ +#include <com/sun/star/ucb/InteractiveIOException.hpp> +#endif #include <tools/wldcrd.hxx> #include <tools/ref.hxx> @@ -622,6 +625,16 @@ sal_Bool UCBContentHelper::MakeFolder( Content& aCnt, const String& aTitle, Cont } } } + catch ( InteractiveIOException& r ) + { + if ( r.Code == IOErrorCode_ALREADY_EXISTING ) + { + INetURLObject aObj( aCnt.getURL() ); + aObj.Append( aTitle ); + rNew = Content( aObj.GetMainURL( INetURLObject::NO_DECODE ), Reference < XCommandEnvironment >() ); + return TRUE; + } + } catch( ::com::sun::star::ucb::CommandAbortedException& ) { } |