Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7618 in orxonox.OLD for branches/qt_gui/src/lib


Ignore:
Timestamp:
May 15, 2006, 2:52:20 PM (19 years ago)
Author:
bensch
Message:

file-stat works

Location:
branches/qt_gui/src/lib/util
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/util/file.cc

    r7616 r7618  
    6262{
    6363  this->_handle = 0;
     64  std::string name = this->_name;
    6465
    6566  this->_status = new struct stat;
    66   if (stat(this->_name.c_str(), this->_status))
     67  // Check the End of the FileName and chop away any \ and //
     68  if (this->_name[this->_name.size()-1] == '/' ||
     69      this->_name[this->_name.size()-1] == '\\')
     70    name.resize(name.size()-1);
     71
     72  if (stat(name.c_str(), this->_status))
    6773  {
    6874    delete this->_status;
  • branches/qt_gui/src/lib/util/file.h

    r7616 r7618  
    5454  private:
    5555    void init();
    56     bool statFile;
     56    bool statFile();
    5757    void homeDirCheck(std::string& fileName);
    5858
Note: See TracChangeset for help on using the changeset viewer.