summaryrefslogtreecommitdiff
path: root/libs/ardour/session.cc
diff options
context:
space:
mode:
authorRobin Gareus <robin@gareus.org>2015-09-10 16:39:35 +0200
committerRobin Gareus <robin@gareus.org>2015-09-10 16:47:26 +0200
commita86aa9e5bc4d2520087310caa4afb3508480b0d7 (patch)
tree6106ebc5a7c623e60c7b8b7a9791eaa1a985dd13 /libs/ardour/session.cc
parentb3e84956627f09c679021449bacbab6d2d601139 (diff)
use FileSource::within_session() for peak-files
Diffstat (limited to 'libs/ardour/session.cc')
-rw-r--r--libs/ardour/session.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/libs/ardour/session.cc b/libs/ardour/session.cc
index 30ab5e1660..91578c9b17 100644
--- a/libs/ardour/session.cc
+++ b/libs/ardour/session.cc
@@ -4374,7 +4374,7 @@ peak_file_helper (const string& peak_path, const string& file_path, const string
}
string
-Session::construct_peak_filepath (const string& filepath, bool oldformat) const
+Session::construct_peak_filepath (const string& filepath, const bool in_session, const bool old_peak_name) const
{
string interchange_dir_string = string (interchange_dir_name) + G_DIR_SEPARATOR;
@@ -4407,7 +4407,7 @@ Session::construct_peak_filepath (const string& filepath, bool oldformat) const
if (in_another_session) {
SessionDirectory sd (session_path);
- return peak_file_helper (sd.peak_path(), "", Glib::path_get_basename (filepath), !oldformat);
+ return peak_file_helper (sd.peak_path(), "", Glib::path_get_basename (filepath), !old_peak_name);
}
}
@@ -4421,11 +4421,11 @@ Session::construct_peak_filepath (const string& filepath, bool oldformat) const
/* 2) if the file is outside our session dir:
* (imported but not copied) add the path for check-summming */
- if (filepath.find (interchange_dir_string) == string::npos) {
+ if (!in_session) {
path = Glib::path_get_dirname (filepath);
}
- return peak_file_helper (_session_dir->peak_path(), path, Glib::path_get_basename (filepath), !oldformat);
+ return peak_file_helper (_session_dir->peak_path(), path, Glib::path_get_basename (filepath), !old_peak_name);
}
string