diff options
author | Sampo Savolainen <v2@iki.fi> | 2007-04-09 17:15:44 +0000 |
---|---|---|
committer | Sampo Savolainen <v2@iki.fi> | 2007-04-09 17:15:44 +0000 |
commit | a3741ccac8946e5e69810e614e5ef28ab86ed548 (patch) | |
tree | ffa2876f024f167f98a1148ccce7ac1adca5ca77 | |
parent | 5257aa9cb45048bd2cd554a3a03ce4821383ed1b (diff) |
Correct the usage of realpath() in cleanup
git-svn-id: svn://localhost/ardour2/trunk@1690 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r-- | libs/ardour/session_state.cc | 8 |
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; } |