summaryrefslogtreecommitdiff
path: root/libs/ardour/file_source.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-03-05 00:34:29 +0000
committerCarl Hetherington <carl@carlh.net>2012-03-05 00:34:29 +0000
commit7a79db9117538be0f5e2674107edb0a4d2d29c4b (patch)
tree686876b7d893ddcc8ae14a17fbc6ed87071337b2 /libs/ardour/file_source.cc
parenta7f31b56af67792407e383982284969f01500407 (diff)
Use inodes_same() function.
git-svn-id: svn://localhost/ardour2/branches/3.0@11591 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/file_source.cc')
-rw-r--r--libs/ardour/file_source.cc10
1 files changed, 3 insertions, 7 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc
index e35ee81364..be4ded9a2c 100644
--- a/libs/ardour/file_source.cc
+++ b/libs/ardour/file_source.cc
@@ -270,6 +270,8 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
/* Remove duplicate inodes from the list of ambiguous files, since if there are symlinks
in the session path it is possible to arrive at the same file via more than one path.
+
+ I suppose this is not necessary on Windows.
*/
vector<string> de_duped_hits;
@@ -280,13 +282,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
++j;
while (j != hits.end()) {
-
- struct stat bufA;
- int const rA = stat (i->c_str(), &bufA);
- struct stat bufB;
- int const rB = stat (j->c_str(), &bufB);
-
- if (rA == 0 && rB == 0 && bufA.st_ino == bufB.st_ino) {
+ if (inodes_same (*i, *j)) {
/* *i and *j are the same file; break out of the loop early */
break;
}