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_use.cxx

    r607 r608  
    18531853  manager   = "";
    18541854  real_path = "";
     1855  m_realpath = "";
    18551856
    18561857  prefix    = "";
     
    19301931
    19311932  real_path = "";
     1933  m_realpath = "";
    19321934
    19331935  if (new_path != "")
     
    19471949
    19481950      CmtSystem::compress_path (real_path);
     1951      if (!CmtSystem::realpath_ (real_path, m_realpath))
     1952        {
     1953          CmtError::set (CmtError::file_access_error, "Cannot compute real path `" +
     1954                         real_path + "'");
     1955          CmtError::print ();
     1956          return;
     1957        }
    19491958    }
    19501959 
     
    35593568  offset = "";
    35603569
    3561   cmtpath = Project::find_in_cmt_paths (real_path);
    3562   Project* p = Project::find_by_cmtpath (cmtpath);
     3570  cmtpath = m_realpath.size ()
     3571    ? Project::find_in_cmt_paths (m_realpath, true)
     3572    : Project::find_in_cmt_paths (real_path)
     3573    ;
     3574  const Project* p = Project::find_by_cmtpath (cmtpath);
    35633575
    35643576  //  if (cmtpath != "")
     
    35743586      //      offset.replace (cmtpath, empty_string);
    35753587      //cerr << "realpath_: get_cmtpath_and_offset" << endl;
    3576       if (!CmtSystem::realpath_ (real_path, offset))
     3588      if (0 != m_realpath.size ())
     3589        offset = m_realpath;
     3590      else if (!CmtSystem::realpath_ (real_path, offset))
    35773591        {
    35783592          CmtError::set (CmtError::file_access_error, "Cannot compute real path `" +
     
    36053619bool Use::get_strategy (const cmt_string& name) const
    36063620{
    3607   const Project* p = Project::find_by_cmtpath (Project::find_in_cmt_paths (real_path));
     3621  const Project* p =
     3622    Project::find_by_cmtpath (m_realpath.size ()
     3623                              ? Project::find_in_cmt_paths (m_realpath, true)
     3624                              : Project::find_in_cmt_paths (real_path)
     3625                              );
     3626  //  const Project* p = Project::find_by_cmtpath (Project::find_in_cmt_paths (real_path));
    36083627
    36093628  bool strategy;
Note: See TracChangeset for help on using the changeset viewer.