summaryrefslogtreecommitdiff
path: root/libs/ardour/session_state.cc
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2007-04-09 17:15:44 +0000
committerSampo Savolainen <v2@iki.fi>2007-04-09 17:15:44 +0000
commita3741ccac8946e5e69810e614e5ef28ab86ed548 (patch)
treeffa2876f024f167f98a1148ccce7ac1adca5ca77 /libs/ardour/session_state.cc
parent5257aa9cb45048bd2cd554a3a03ce4821383ed1b (diff)
Correct the usage of realpath() in cleanup
git-svn-id: svn://localhost/ardour2/trunk@1690 d708f5d6-7413-0410-9779-e7cbd77b26cf
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r--libs/ardour/session_state.cc8
1 files 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<string*>::iterator x = soundfiles->begin(); x != soundfiles->end(); ++x) {
@@ -2698,7 +2699,10 @@ Session::cleanup_sources (Session::cleanup_report& rep)
for (set<string>::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;
}