diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 12:38:16 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 18:24:08 -0400 |
commit | 34c5aaf326a60581398109d027b39e93586bd3f6 (patch) | |
tree | 0fc60784166ec9e97c3515b94197c2fac974d85f | |
parent | 499e9a5ec6db2f0d9b4a7dc23e9c99b6858328d0 (diff) |
FileSource should not generate its own error message when a file is missing
Conflicts:
libs/ardour/file_source.cc
-rw-r--r-- | libs/ardour/file_source.cc | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index 30ae2178fe..5833d29e3a 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -256,8 +256,6 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist split (search_path, dirs, ':'); - hits.clear (); - for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) { fullpath = Glib::build_filename (*i, path); @@ -312,9 +310,9 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist /* no match: error */ if (must_exist) { - error << string_compose( - _("Filesource: cannot find required file (%1): while searching %2"), - path, search_path) << endmsg; + /* do not generate an error here, leave that to + whoever deals with the false return value. + */ goto out; } else { isnew = true; @@ -325,16 +323,17 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist keeppath = de_duped_hits[0]; } - - } else { + + } else { keeppath = path; } /* Current find() is unable to parse relative path names to yet non-existant sources. QuickFix(tm) */ - if (keeppath == "") { - if (must_exist) { + + if (keeppath.empty()) { + if (must_exist) { error << "FileSource::find(), keeppath = \"\", but the file must exist" << endl; } else { keeppath = path; |