finally get to the bottom of where NO_PLUGIN_STATE needs to be in order to be useful
[ardour.git] / libs / ardour / file_source.cc
index e3a442b0de79fa9fda9a86131a0b7400c5232c1f..09214981861f142536d714b894b44adeb8e2d2a1 100644 (file)
@@ -111,28 +111,18 @@ 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);
-                       }
+       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) {