Ignore:
Timestamp:
Apr 3, 2012, 3:54:50 PM (12 years ago)
Author:
rybkin
Message:

See C.L. 482

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CMT/HEAD/source/cmt_system.cxx

    r599 r607  
    334334}
    335335
     336//--------------------------------------------------
     337bool CmtSystem::realpath_ (const cmt_string& path, cmt_string& result)
     338{
     339  char buffer[PATH_MAX + 1];
     340#ifndef WIN32
     341  if (::realpath (path, buffer))
     342    {
     343      result = buffer;
     344      //      cerr << "path: " << path << " result: " << result << endl;
     345      return true;
     346    }
     347  else
     348    {
     349      //      cerr << "path: " << path << " result: " << result << endl;
     350      if (errno != ENOENT
     351          && errno != ENOTDIR
     352          )
     353        {
     354          perror ("cmt: realpath failure: " + get_absolute_path (path));
     355        }
     356      return false;
     357    }
     358#else
     359  if (::_fullpath (buffer, path, PATH_MAX + 1))
     360    {
     361      result = buffer;
     362      return true;
     363    }
     364  else
     365    {
     366      return false;
     367    }
     368#endif
     369}
     370
     371/*
    336372//--------------------------------------------------
    337373bool CmtSystem::realpath_ (const cmt_string& path, cmt_string& result)
     
    359395  return false;
    360396}
    361 
     397*/
    362398//--------------------------------------------------
    363399bool CmtSystem::absolute_path (const cmt_string& name)
Note: See TracChangeset for help on using the changeset viewer.