diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 12:38:16 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2014-09-15 14:09:12 -0400 |
commit | 596a9247bd6e5cc97b0bf3809721e1c56d872c1a (patch) | |
tree | be4b62fa08f6e207077e6248b56f5fbedd5abead /libs/ardour/file_source.cc | |
parent | c96ec968c7bb4b1d7c358f522a49b0685c022920 (diff) |
FileSource should not generate its own error message when a file is missing
Diffstat (limited to 'libs/ardour/file_source.cc')
-rw-r--r-- | libs/ardour/file_source.cc | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/file_source.cc b/libs/ardour/file_source.cc index bb6d3562fa..a4d317af71 100644 --- a/libs/ardour/file_source.cc +++ b/libs/ardour/file_source.cc @@ -252,8 +252,6 @@ FileSource::find (Session& s, DataType type, const string& path, bool must_exist goto out; } - hits.clear (); - for (vector<string>::iterator i = dirs.begin(); i != dirs.end(); ++i) { fullpath = Glib::build_filename (*i, path); @@ -308,8 +306,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)"), path) << endmsg; + /* do not generate an error here, leave that to + whoever deals with the false return value. + */ goto out; } else { isnew = true; @@ -320,16 +319,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; |