#92987#: handle case of already existing folder
This commit is contained in:
parent
2578834b69
commit
7e0c9acedd
1 changed files with 15 additions and 2 deletions
|
@ -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& )
|
||||
{
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue