diff options
Diffstat (limited to 'libs/ardour/session_state.cc')
-rw-r--r-- | libs/ardour/session_state.cc | 22 |
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; |