From a3741ccac8946e5e69810e614e5ef28ab86ed548 Mon Sep 17 00:00:00 2001 From: Sampo Savolainen Date: Mon, 9 Apr 2007 17:15:44 +0000 Subject: [PATCH] Correct the usage of realpath() in cleanup git-svn-id: svn://localhost/ardour2/trunk@1690 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/session_state.cc | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc index c4563ce0e2..119d2c858d 100644 --- a/libs/ardour/session_state.cc +++ b/libs/ardour/session_state.cc @@ -2689,7 +2689,8 @@ Session::cleanup_sources (Session::cleanup_report& rep) } } - char tmppath[PATH_MAX+1]; + char tmppath1[PATH_MAX+1]; + char tmppath2[PATH_MAX+1]; for (vector::iterator x = soundfiles->begin(); x != soundfiles->end(); ++x) { @@ -2698,7 +2699,10 @@ Session::cleanup_sources (Session::cleanup_report& rep) for (set::iterator i = all_sources.begin(); i != all_sources.end(); ++i) { - if (strcmp(realpath(spath.c_str(), tmppath), realpath( (*i).c_str(), tmppath)) == 0) { + realpath(spath.c_str(), tmppath1); + realpath((*i).c_str(), tmppath2); + + if (strcmp(tmppath1, tmppath2) == 0) { used = true; break; } -- 2.30.2