13
0

Fix PBD::sys::inodes_same to check that paths are on same device

two paths can have the same inode and be on different devices and hence
would not be equivalent

git-svn-id: svn://localhost/ardour2/branches/3.0@12856 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Tim Mayberry 2012-06-23 05:07:56 +00:00
parent f4d826047f
commit 5ae32cdfd9

View File

@ -228,7 +228,7 @@ inodes_same (const path& a, const path& b)
struct stat bB;
int const rB = g_stat (b.to_string().c_str(), &bB);
return (rA == 0 && rB == 0 && bA.st_ino == bB.st_ino);
return (rA == 0 && rB == 0 && bA.st_dev == bB.st_dev && bA.st_ino == bB.st_ino);
}
/** Find out if `needle' is a file or directory within the