1 --- sfx2/source/doc/doctemplates.cxx.old 2008-10-14 08:23:43.000000000 +0200
2 +++ sfx2/source/doc/doctemplates.cxx 2009-03-23 20:37:14.000000000 +0100
4 #include <tools/urlobj.hxx>
5 #include <rtl/ustring.hxx>
6 #include <rtl/ustrbuf.hxx>
7 +#include <osl/file.hxx>
9 #include <tools/resary.hxx>
11 @@ -1218,12 +1219,17 @@ void SfxDocTplService_Impl::doUpdate()
15 - if ( Content::create( pDirs[ nCountDir ], aQuietEnv, aDirContent ) )
16 + osl::Directory aDirectory (pDirs[ nCountDir ]);
17 + osl::FileBase::RC nError = aDirectory.open();
18 + if (nError == osl::FileBase::E_None || bWriteableDirectory)
20 - createFromContent( aGroupList, aDirContent, sal_False, bWriteableDirectory );
21 + if ( Content::create( pDirs[ nCountDir ], aQuietEnv, aDirContent ) )
23 + createFromContent( aGroupList, aDirContent, sal_False, bWriteableDirectory );
28 - bWriteableDirectory = sal_False;
29 + bWriteableDirectory = sal_False;