From dbf86a495b89380526f731e7bd15e0a41b91fc1e Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Wed, 7 Sep 2016 12:38:39 -0400 Subject: for files imported without copy, _origin is a full path. We should use this when looking for the file at session load --- libs/ardour/audiofilesource.cc | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/libs/ardour/audiofilesource.cc b/libs/ardour/audiofilesource.cc index bb0b4da774..a25e19ea5a 100644 --- a/libs/ardour/audiofilesource.cc +++ b/libs/ardour/audiofilesource.cc @@ -131,7 +131,10 @@ AudioFileSource::AudioFileSource (Session& s, const string& path, Source::Flag f } -/** Constructor used for existing internal-to-session files via XML. File must exist. */ +/** Constructor used for existing files via XML. File must exist. If _origin + * is an absolute path after ::set_state(), then the file is external to the + * session. + */ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exist) : Source (s, node) , AudioSource (s, node) @@ -141,6 +144,11 @@ AudioFileSource::AudioFileSource (Session& s, const XMLNode& node, bool must_exi throw failed_constructor (); } + if (Glib::path_is_absolute (_origin)) { + _path = _origin; + must_exist = true; + } + if (init (_path, must_exist)) { throw failed_constructor (); } -- cgit v1.2.3