diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-31 09:35:06 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2013-03-31 09:35:06 -0400 |
commit | 8388e82fd39fc8babf09a5ff6a968f073ddf4a7c (patch) | |
tree | ae77af4974cd14b1d750159213062d297e535e72 /libs/ardour/file_source.cc | |
parent | 153e57269689bb118b2e560cf01270a35ef1770f (diff) |
more work on the suprisingly ongoing filename/path/origin issue
Diffstat (limited to 'libs/ardour/file_source.cc')
-rw-r--r-- | libs/ardour/file_source.cc | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index e3a442b0de..0aa0a4ade8 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -111,28 +111,20 @@ FileSource::init (const string& pathstr, bool must_exist) { _timeline_position = 0; - if (!_file_is_new) { - - if (Stateful::loading_state_version < 3000) { - if (!find_2X (_session, _type, pathstr, must_exist, _file_is_new, _channel, _path)) { - throw MissingSource (pathstr, _type); - } - } else { - string look_for; - - if (!_origin.empty()) { - look_for = _origin; - } else { - look_for = pathstr; - } - - if (!find (_session, _type, look_for, must_exist, _file_is_new, _channel, _path)) { - throw MissingSource (pathstr, _type); - } + cerr << "FileSource looking for " << pathstr << endl; + + if (Stateful::loading_state_version < 3000) { + if (!find_2X (_session, _type, pathstr, must_exist, _file_is_new, _channel, _path)) { + throw MissingSource (pathstr, _type); + } + } else { + if (!find (_session, _type, pathstr, must_exist, _file_is_new, _channel, _path)) { + throw MissingSource (pathstr, _type); } } set_within_session_from_path (_path); + _name = Glib::path_get_basename (_path); if (must_exist) { |