Changeset 608 for CMT/HEAD/source/cmt_project.cxx
- Timestamp:
- Apr 5, 2012, 1:43:26 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_project.cxx
r607 r608 987 987 988 988 Use& use = Use::current(); 989 cmt_string current_path (Cmt::get_current_dir ()); 989 cmt_string current_path; 990 cmt_string current_path_real; 990 991 if (use.located ()) 991 992 { 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)) 998 1007 { 999 1008 CmtError::set (CmtError::file_access_error, "Cannot compute real path `" + … … 1650 1659 1651 1660 //---------------------------------------------------------- 1652 cmt_string Project::find_in_cmt_paths (const cmt_string& path )1661 cmt_string Project::find_in_cmt_paths (const cmt_string& path, bool realpath) 1653 1662 { 1654 1663 //const cmt_string pwd = CmtSystem::pwd (); … … 1657 1666 cmt_string path_real; 1658 1667 //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)) 1660 1671 return (""); 1661 1672
Note: See TracChangeset
for help on using the changeset viewer.