summaryrefslogtreecommitdiff
path: root/libs/ardour/file_source.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/file_source.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/file_source.cc')
-rw-r--r--libs/ardour/file_source.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc
index fd3e9ef142..f4f3c40d9d 100644
--- a/libs/ardour/file_source.cc
+++ b/libs/ardour/file_source.cc
@@ -33,6 +33,7 @@
#include "pbd/strsplit.h"
#include "pbd/shortpath.h"
#include "pbd/enumwriter.h"
+#include "pbd/filesystem.h"
#include <glibmm/miscutils.h>
#include <glibmm/fileutils.h>
@@ -277,7 +278,7 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist
++j;
while (j != hits.end()) {
- if (inodes_same (*i, *j)) {
+ if (PBD::sys::inodes_same (*i, *j)) {
/* *i and *j are the same file; break out of the loop early */
break;
}