Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7673 in orxonox.OLD for trunk/src/lib


Ignore:
Timestamp:
May 18, 2006, 11:06:17 AM (19 years ago)
Author:
bensch
Message:

ok, now running on Windows

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/util/file.cc

    r7661 r7673  
    146146    this->_status = new struct stat;
    147147  // Check the End of the FileName and chop away any \ and //
    148   /*  std::string name = this->_name;
    149     if (this->_name[this->_name.size()-1] == '/' ||
    150         this->_name[this->_name.size()-1] == '\\')
    151          name.resize(name.size()-1);*/
    152   if (stat(this->_name.c_str(), this->_status))
     148  std::string name = this->_name;
     149  while (name[name.size()-1] == '/' ||
     150         name[name.size()-1] == '\\')
     151    name.resize(name.size()-1);
     152  if (stat(name.c_str(), this->_status))
    153153  {
    154154    delete this->_status;
     
    206206  //  tmpDirName.erase(tmpDirName.size()-1);
    207207  //}
     208  printf("DIR IS: %s ", this->name().c_str());
     209  if (this->_status)
     210    printf("OK\n");
     211  else
     212    printf("FUCK\n");
     213
    208214  return (this->_status != NULL && this->_status->st_mode & (S_IFDIR));
    209215}
Note: See TracChangeset for help on using the changeset viewer.