Ignore:
Timestamp:
07/09/2008 14:20:14 (4 years ago)
Author:
chris
Message:

Fix test regression on Windows where a const char pointer was treated
as a file handle instead of as a string.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • box/trunk/lib/common/FileStream.h

    r2243 r2275  
    3939#endif 
    4040                int mode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)); 
     41 
     42        // Ensure that const char * name doesn't end up as a handle 
     43        // on Windows! 
     44 
     45        FileStream(const char *pFilename,  
     46#ifdef WIN32 
     47                int flags = (O_RDONLY | O_BINARY), 
     48#else 
     49                int flags = O_RDONLY, 
     50#endif 
     51                int mode = (S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH)); 
     52 
    4153        FileStream(tOSFileHandle FileDescriptor); 
    4254         
     
    5769        bool mIsEOF; 
    5870        FileStream(const FileStream &rToCopy) { /* do not call */ } 
     71        void AfterOpen(); 
    5972 
    6073        // for debugging.. 
Note: See TracChangeset for help on using the changeset viewer.