Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7619 in orxonox.OLD


Ignore:
Timestamp:
May 15, 2006, 2:54:11 PM (18 years ago)
Author:
bensch
Message:

faster

File:
1 edited

Legend:

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

    r7618 r7619  
    6262{
    6363  this->_handle = 0;
    64   std::string name = this->_name;
    6564
    6665  this->_status = new struct stat;
    6766  // 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))
     67  /*  std::string name = this->_name;
     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(this->_name.c_str(), this->_status))
    7373  {
    7474    delete this->_status;
     
    250250  std::string homeDir;
    251251#ifdef __WIN32__
    252     homeDir = getenv("USERPROFILE");
    253 #else
    254     homeDir = getenv("HOME");
    255 #endif
    256     fileName = homeDir + fileName.substr(1);
     252  homeDir = getenv("USERPROFILE");
     253#else
     254  homeDir = getenv("HOME");
     255#endif
     256  fileName = homeDir + fileName.substr(1);
    257257}
    258258
Note: See TracChangeset for help on using the changeset viewer.