Ignore:
Timestamp:
Apr 5, 2012, 1:43:26 PM (12 years ago)
Author:
rybkin
Message:

See C.L. 483

File:
1 edited

Legend:

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

    r607 r608  
    987987
    988988  Use& use = Use::current();
    989   cmt_string current_path (Cmt::get_current_dir ());
     989  cmt_string current_path;
     990  cmt_string current_path_real;
    990991  if (use.located ())
    991992    {
    992       current_path = use.real_path;
    993       CmtMessage::verbose ("Using current use real_path `" + current_path + "'");
    994     }
    995 
    996   cmt_string current_path_real;
    997   if (!CmtSystem::realpath_ (current_path, current_path_real))
     993      current_path_real = use.get_realpath ();
     994      if (current_path_real.size ())
     995        CmtMessage::verbose ("Using current use realpath `" + current_path_real + "'");
     996      else
     997        {
     998          current_path = use.real_path;
     999          CmtMessage::verbose ("Using current use real_path `" + current_path + "'");
     1000        }
     1001    }
     1002  else
     1003    current_path = Cmt::get_current_dir ();
     1004
     1005  if (0 == current_path_real.size () &&
     1006      !CmtSystem::realpath_ (current_path, current_path_real))
    9981007    {
    9991008      CmtError::set (CmtError::file_access_error, "Cannot compute real path `" +
     
    16501659
    16511660//----------------------------------------------------------
    1652 cmt_string Project::find_in_cmt_paths (const cmt_string& path)
     1661cmt_string Project::find_in_cmt_paths (const cmt_string& path, bool realpath)
    16531662{
    16541663  //const cmt_string pwd = CmtSystem::pwd ();
     
    16571666  cmt_string path_real;
    16581667  //cerr << "realpath_: find_in_cmt_paths" << endl;
    1659   if (!CmtSystem::realpath_ (path, path_real))
     1668  if (realpath)
     1669    path_real = path;
     1670  else if (!CmtSystem::realpath_ (path, path_real))
    16601671    return ("");
    16611672
Note: See TracChangeset for help on using the changeset viewer.