Skip to content

Commit f19cfec

Browse files
committed
Fix FileExists() logic
1 parent 2a50010 commit f19cfec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/clutils/dirobj.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ class SC_UTILS_EXPORT DirObj {
6161
const char * File( int index );
6262
// check for file in the currently loaded directory
6363
bool FileExists( const char * file ) {
64-
return Index( file ) ? 1 : 0;
64+
return Index( file ) != -1;
6565
}
6666
bool FileExists( const std::string & file ) {
67-
return Index( file.c_str() ) ? true : false;
67+
return Index( file.c_str() ) != -1;
6868
}
6969
int Count();
7070

0 commit comments

Comments
 (0)