From 7eb8a33910bfdab21b98d794dc731bc8e8557cb9 Mon Sep 17 00:00:00 2001 From: Carl Hetherington Date: Mon, 28 May 2012 16:32:41 +0000 Subject: 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 --- libs/ardour/file_source.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/ardour/file_source.cc') 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 #include @@ -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; } -- cgit v1.2.3