Changeset 607 for CMT/HEAD/source/cmt_system.cxx
- Timestamp:
- Apr 3, 2012, 3:54:50 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CMT/HEAD/source/cmt_system.cxx
r599 r607 334 334 } 335 335 336 //-------------------------------------------------- 337 bool 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 /* 336 372 //-------------------------------------------------- 337 373 bool CmtSystem::realpath_ (const cmt_string& path, cmt_string& result) … … 359 395 return false; 360 396 } 361 397 */ 362 398 //-------------------------------------------------- 363 399 bool CmtSystem::absolute_path (const cmt_string& name)
Note: See TracChangeset
for help on using the changeset viewer.