From 5ae32cdfd9d85b9202adfb7e4028c621c23000b2 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Sat, 23 Jun 2012 05:07:56 +0000 Subject: 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 --- libs/pbd/filesystem.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/pbd') 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 -- cgit v1.2.3