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
This commit is contained in:
parent
7a79db9117
commit
4fb5d4596b
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user