Author: Not specified Language: cpp
Description: Not specified Timestamp: 2013-05-20 21:42:52 +0000
View raw paste Reply
  1. /* Resolves path names and determines if they are the same */
  2. /* For use with full OS paths not quake paths */
  3. bool Sys_PathCmp( const char *path1, const char *path2 )
  4. {
  5.         char *r1, *r2;
  6.  
  7.         r1 = realpath(path1, NULL);
  8.         r2 = realpath(path2, NULL);
  9.  
  10.         if(r1 && r2 && !Q_stricmp(r1, r1))
  11.         {
  12.                 free(r1);
  13.                 free(r2);
  14.                 return true;
  15.         }
  16.  
  17.         free(r1);
  18.         free(r2);
  19.         return false;
  20. }
View raw paste Reply