(fix loading old sessions)
git-svn-id: svn://localhost/ardour2/trunk@924
d708f5d6-7413-0410-9779-
e7cbd77b26cf
/* support old session structure */
struct stat statbuf;
- string old;
+ string old_nopath;
+ string old_withpath;
- if (with_path) {
- old = _path;
- }
-
- old += sound_dir_name;
- old += '/';
+ old_nopath += old_sound_dir_name;
+ old_nopath += '/';
+
+ old_withpath = _path;
+ old_withpath += old_sound_dir_name;
+ old_withpath += '/';
- if (stat (old.c_str(), &statbuf) == 0) {
- return old;
+ if (stat (old_withpath.c_str(), &statbuf) == 0) {
+ if (with_path)
+ return old_withpath;
+
+ return old_nopath;
}
string res;