summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2006-09-23 10:06:57 +0000
committerSampo Savolainen <v2@iki.fi>2006-09-23 10:06:57 +0000
commit75fd93406d1c75d88f56bde0c3229d86af51ca7e (patch)
treea049524fbc1e66d1d36dc06e4c2cb5551b14adbd
parent41bc62b35b8194fd607aa2541e2057abd680078a (diff)
Nick, I am your god.
(fix loading old sessions) git-svn-id: svn://localhost/ardour2/trunk@924 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/session_state.cc22
1 files changed, 13 insertions, 9 deletions
diff --git a/libs/ardour/session_state.cc b/libs/ardour/session_state.cc
index 53a6273072..147a09d27d 100644
--- a/libs/ardour/session_state.cc
+++ b/libs/ardour/session_state.cc
@@ -2249,17 +2249,21 @@ Session::sound_dir (bool with_path) const
/* 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;