summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-03-09 11:52:09 +0100
committerStephan Bergmann <sbergman@redhat.com>2012-03-09 11:56:10 +0100
commit608fe962cc649ad62c489811d3a8666e0e06e5e7 (patch)
treed9bcc379775a68647fa850a2e613be97650d17dd /tools
parentf3f6c9be9864088b94f874c6ef2ce8ab1dd45f2a (diff)
Let osl::FileStatus getters assert programming errors
...instead of arbitrarily returning certain values when the requested information is not available. This reveals a problem in strmunx.cxx that is apparently a regression introduced with 4a086fca7b0a77c20bc9f1c97507966e2861f3da "fix SvStream to not require a custom open or lstat method."
Diffstat (limited to 'tools')
-rw-r--r--tools/source/stream/strmunx.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/tools/source/stream/strmunx.cxx b/tools/source/stream/strmunx.cxx
index cb55ddc73d6b..23171206c874 100644
--- a/tools/source/stream/strmunx.cxx
+++ b/tools/source/stream/strmunx.cxx
@@ -628,8 +628,8 @@ void SvFileStream::Open( const String& rFilename, StreamMode nOpenMode )
// FIXME: we really need to switch to a pure URL model ...
if ( osl::File::getFileURLFromSystemPath( aFilename, aFileURL ) != osl::FileBase::E_None )
aFileURL = aFilename;
- bool bStatValid = ( osl::DirectoryItem::get( aFileURL, aItem) != osl::FileBase::E_None &&
- aItem.getFileStatus( aStatus ) != osl::FileBase::E_None );
+ bool bStatValid = ( osl::DirectoryItem::get( aFileURL, aItem) == osl::FileBase::E_None &&
+ aItem.getFileStatus( aStatus ) == osl::FileBase::E_None );
// SvFileStream can't open a directory
if( bStatValid && aStatus.getFileType() == osl::FileStatus::Directory )