comparison src/utils.cc @ 6598:ce819776ee76

[project @ 2007-04-27 17:34:27 by jwe]
author jwe
date Fri, 27 Apr 2007 17:34:28 +0000
parents 41c1deed5613
children 3d913ba36b75
comparison
equal deleted inserted replaced
6597:65919b012b35 6598:ce819776ee76
116 // Return TRUE if F and G are both names for the same file. 116 // Return TRUE if F and G are both names for the same file.
117 117
118 bool 118 bool
119 same_file (const std::string& f, const std::string& g) 119 same_file (const std::string& f, const std::string& g)
120 { 120 {
121 std::string c_f = file_ops::canonicalize_file_name (f); 121 return same_file_internal (f, g);
122 std::string c_g = file_ops::canonicalize_file_name (g);
123
124 file_stat f_fs (c_f);
125 file_stat g_fs (c_g);
126
127 return (f_fs.ino () == g_fs.ino () && f_fs.dev () == g_fs.dev ());
128 } 122 }
129 123
130 int 124 int
131 almost_match (const std::string& std, const std::string& s, int min_match_len, 125 almost_match (const std::string& std, const std::string& s, int min_match_len,
132 int case_sens) 126 int case_sens)