diff options
author | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:07:56 +0000 |
---|---|---|
committer | Tim Mayberry <mojofunk@gmail.com> | 2012-06-23 05:07:56 +0000 |
commit | 5ae32cdfd9d85b9202adfb7e4028c621c23000b2 (patch) | |
tree | 13b21140cefc4abf061495ed84f21f2479f1837e /libs/pbd | |
parent | f4d826047fc6f4088f86aace232de5863888d667 (diff) |
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
Diffstat (limited to 'libs/pbd')
-rw-r--r-- | libs/pbd/filesystem.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libs/pbd/filesystem.cc b/libs/pbd/filesystem.cc index 343e69023c..fc4676a38d 100644 --- a/libs/pbd/filesystem.cc +++ b/libs/pbd/filesystem.cc @@ -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 |