do not use invalid Directory instance (OSL_ASSERT about a NULL pointer)
Change-Id: Icc1dffc9b63453575ab927a3bdfa4b25cecfe8f2
This commit is contained in:
@@ -20,15 +20,17 @@ void TemporaryFonts::clear()
|
||||
rtl::Bootstrap::expandMacros( path );
|
||||
path += "/user/temp/fonts/";
|
||||
osl::Directory dir( path );
|
||||
dir.reset();
|
||||
for(;;)
|
||||
if( dir.reset() == osl::Directory::E_None )
|
||||
{
|
||||
osl::DirectoryItem item;
|
||||
if( dir.getNextItem( item ) != osl::Directory::E_None )
|
||||
break;
|
||||
osl::FileStatus status( osl_FileStatus_Mask_FileURL );
|
||||
if( item.getFileStatus( status ) == osl::File::E_None )
|
||||
osl::File::remove( status.getFileURL());
|
||||
for(;;)
|
||||
{
|
||||
osl::DirectoryItem item;
|
||||
if( dir.getNextItem( item ) != osl::Directory::E_None )
|
||||
break;
|
||||
osl::FileStatus status( osl_FileStatus_Mask_FileURL );
|
||||
if( item.getFileStatus( status ) == osl::File::E_None )
|
||||
osl::File::remove( status.getFileURL());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user