13
0

Correct the usage of realpath() in cleanup

git-svn-id: svn://localhost/ardour2/trunk@1690 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2007-04-09 17:15:44 +00:00
parent 5257aa9cb4
commit a3741ccac8

View File

@ -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;
}