diff options
author | Carl Hetherington <carl@carlh.net> | 2012-03-05 00:34:45 +0000 |
---|---|---|
committer | Carl Hetherington <carl@carlh.net> | 2012-03-05 00:34:45 +0000 |
commit | 4fb5d4596bd51fcd33d97b3888d46fe018803e21 (patch) | |
tree | d19a9b101f658396bf37f64f787a245b1063996f /libs/ardour/session.cc | |
parent | 7a79db9117538be0f5e2674107edb0a4d2d29c4b (diff) |
Prevent duplication of search path elements when symlinks are involved (#4568).
git-svn-id: svn://localhost/ardour2/branches/3.0@11592 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r-- | libs/ardour/session.cc | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc index 10039a7ff4..bafa50a275 100644 --- a/libs/ardour/session.cc +++ b/libs/ardour/session.cc @@ -4482,7 +4482,13 @@ Session::ensure_search_path_includes (const string& path, DataType type) split (search_path, dirs, ':'); for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) { - if (*i == path) { + /* No need to add this new directory if it has the same inode as + an existing one; checking inode rather than name prevents duplicated + directories when we are using symlinks. + + On Windows, I think we could just do if (*i == path) here. + */ + if (inodes_same (*i, path)) { return; } } |