Changeset 517

Show
Ignore:
Timestamp:
04/04/09 10:43:04 (3 years ago)
Author:
uncle_fungus
Message:

Made file handling more rigorous - fixes Windows incompetence

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r515 r517  
    11FahMon: The Folding@home client monitoring program 
     2 
     3SVN 
     4 
     5    General 
     6 
     7      Monitoring 
     8 
     9      * Added more rigorous checks to file handling to ensure that invalid file 
     10        access attempts don't crash FahMon (particularly on Windows). 
    211 
    312v2.3.99 (03/04/09) 
  • trunk/src/tools.cpp

    r485 r517  
    8888        localname = multiProtocolFile::GetLocalFileName(filename); 
    8989 
     90        if(!wxFile::Access(localname, wxFile::read)) 
     91                return false; 
     92 
    9093        wxFile in(localname, wxFile::read); 
     94        if(!in.IsOpened()) 
     95                return false; 
    9196        length = (length == 0) ? in.Length() : std::min<off_t>(length, in.Length()); 
    9297        if(length==0)