diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-10-06 15:00:29 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-10-06 15:31:16 +0200 |
commit | e8233e1510cf9f16a42feb5d60e5fdfda4f921fc (patch) | |
tree | 973fc5e41edfca12c49f8b9d7d6437fa03da568d /basic | |
parent | clang-analyzer-deadcode.DeadStores (diff) | |
download | core-e8233e1510cf9f16a42feb5d60e5fdfda4f921fc.tar.gz core-e8233e1510cf9f16a42feb5d60e5fdfda4f921fc.zip |
clang-analyzer-deadcode.DeadStores
Change-Id: I03769bd4105e4e1d140b2885978ea9da9ef866de
Diffstat (limited to 'basic')
-rw-r--r-- | basic/source/runtime/methods.cxx | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/basic/source/runtime/methods.cxx b/basic/source/runtime/methods.cxx index 4628686c0f69..9d83fcc2d2f1 100644 --- a/basic/source/runtime/methods.cxx +++ b/basic/source/runtime/methods.cxx @@ -682,8 +682,8 @@ void implRemoveDirRecursive( const OUString& aDirPath ) FileStatus aFileStatus( osl_FileStatus_Mask_Type ); nRet = aItem.getFileStatus( aFileStatus ); - FileStatus::Type aType = aFileStatus.getFileType(); - bool bFolder = isFolder( aType ); + bool bFolder = nRet == FileBase::E_None + && isFolder( aFileStatus.getFileType() ); if( !bExists || !bFolder ) { @@ -710,6 +710,11 @@ void implRemoveDirRecursive( const OUString& aDirPath ) // Handle flags FileStatus aFileStatus2( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileURL ); nRet = aItem2.getFileStatus( aFileStatus2 ); + if( nRet != FileBase::E_None ) + { + SAL_WARN("basic", "getFileStatus failed"); + continue; + } OUString aPath = aFileStatus2.getFileURL(); // Directory? @@ -3056,6 +3061,11 @@ RTLFUNC(Dir) // Handle flags FileStatus aFileStatus( osl_FileStatus_Mask_Type | osl_FileStatus_Mask_FileName ); nRet = aItem.getFileStatus( aFileStatus ); + if( nRet != FileBase::E_None ) + { + SAL_WARN("basic", "getFileStatus failed"); + continue; + } // Only directories? if( bFolderFlag ) |