- Timestamp:
- Apr 21, 2005, 1:14:29 AM (19 years ago)
- Location:
- CMT/HEAD
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/ChangeLog
r38 r39 1 2005-04-21 Christian Arnault <arnault@lal.in2p3.fr> 268 2 3 * source/cmt_project.cxx (create_project): Check pwd for finding 4 projects. 5 6 * source/cmt_symbol.cxx (find_path_entry): Look for existing PATH 7 entries by comparing the real path rather than the logical 8 path. Use pwd everywhere. 9 1 10 2005-04-14 Christian Arnault <arnault@lal.in2p3.fr> 267 2 11 -
CMT/HEAD/source/cmt_project.cxx
r38 r39 211 211 CmtSystem::split (cmtprojectpath, sep, items); 212 212 213 cmt_string here = CmtSystem::pwd (); 214 if (!CmtSystem::cd (compressed_path)) return (0); 215 cmt_string pwd = CmtSystem::pwd (); 216 213 217 static Project::ProjectVector& Projects = Project::projects (); 214 218 … … 218 222 219 223 if ((p.get_cmtpath () == compressed_path) || 220 (p.get_cmtpath_pwd () == compressed_path) ||224 (p.get_cmtpath_pwd () == pwd) || 221 225 (specify_name && (p.get_name () == specified_name))) 222 226 { … … 243 247 } 244 248 249 CmtSystem::cd (here); 245 250 return (&p); 246 251 } … … 253 258 bool is_current = false; 254 259 255 cmt_string here = CmtSystem::pwd ();256 if (!CmtSystem::cd (compressed_path)) return (0);257 258 260 cmt_string name = specified_name; 259 261 cmt_string project_name; … … 263 265 // Figure out if this is the current project 264 266 // 265 cmt_string pwd = CmtSystem::pwd ();266 267 if (here.find (pwd) == 0) is_current = true; 267 268 … … 1419 1420 int i; 1420 1421 1421 /*1422 1422 for (i = 0; i < m_parents.size (); i++) 1423 1423 { … … 1433 1433 cout << " C=" << p->get_name (); 1434 1434 } 1435 */1436 1435 1437 1436 cout << endl; -
CMT/HEAD/source/cmt_symbol.cxx
r11 r39 1939 1939 { 1940 1940 static const cmt_string path_separator = CmtSystem::path_separator (); 1941 static const cmt_string double_path_separator = path_separator + path_separator; 1942 1943 cmt_string complete_paths; 1944 1945 complete_paths = path_separator; 1946 complete_paths += paths; 1947 complete_paths += path_separator; 1948 1949 complete_paths.replace_all (double_path_separator, path_separator); 1950 1951 cmt_string complete_value; 1952 complete_value = path_separator; 1953 complete_value += value; 1954 complete_value += path_separator; 1955 1956 if (complete_paths.find (complete_value) == cmt_string::npos) return (false); 1957 else return (true); 1941 1942 cmt_string here = CmtSystem::pwd (); 1943 1944 CmtSystem::cd (value); 1945 cmt_string rvalue = CmtSystem::pwd (); 1946 1947 CmtSystem::cmt_string_vector items; 1948 CmtSystem::split (paths, path_separator, items); 1949 1950 bool found = false; 1951 1952 for (int i = 0; i < items.size (); i++) 1953 { 1954 const cmt_string& item = items[i]; 1955 CmtSystem::cd (item); 1956 cmt_string ritem = CmtSystem::pwd (); 1957 if (ritem == rvalue) 1958 { 1959 found = true; 1960 break; 1961 } 1962 } 1963 1964 CmtSystem::cd (here); 1965 return (found); 1958 1966 } 1959 1967
Note: See TracChangeset
for help on using the changeset viewer.