mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-28 01:17:42 +01:00
Use inodes_same() function.
git-svn-id: svn://localhost/ardour2/branches/3.0@11591 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
parent
a7f31b56af
commit
7a79db9117
1 changed files with 3 additions and 7 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue