summaryrefslogtreecommitdiff
path: root/libs/ardour/utils.cc
diff options
context:
space:
mode:
authorCarl Hetherington <carl@carlh.net>2012-05-28 16:32:41 +0000
committerCarl Hetherington <carl@carlh.net>2012-05-28 16:32:41 +0000
commit7eb8a33910bfdab21b98d794dc731bc8e8557cb9 (patch)
tree8a22b28badb6f4bdfd9c9660c50f6e5c1605e8c9 /libs/ardour/utils.cc
parentd825f20a324dc05fae612b748c579c22df88a471 (diff)
Add path_is_within to decide if a path is within a given
directory, taking symlinks into account, and use it to decide whether a file is within the session folder. Should fix #4552. git-svn-id: svn://localhost/ardour2/branches/3.0@12468 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/utils.cc')
-rw-r--r--libs/ardour/utils.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/libs/ardour/utils.cc b/libs/ardour/utils.cc
index beb003e713..8ab20ecc62 100644
--- a/libs/ardour/utils.cc
+++ b/libs/ardour/utils.cc
@@ -745,18 +745,6 @@ double slider_position_to_gain_with_max (double g, double max_gain)
return slider_position_to_gain (g * max_gain/2.0);
}
-/** @return true if files a and b have the same inode */
-bool
-inodes_same (const string& a, const string& b)
-{
- struct stat bA;
- int const rA = stat (a.c_str(), &bA);
- struct stat bB;
- int const rB = stat (b.c_str(), &bB);
-
- return (rA == 0 && rB == 0 && bA.st_ino == bB.st_ino);
-}
-
extern "C" {
void c_stacktrace() { stacktrace (cerr); }
}