diff --git a/ChangeLog b/ChangeLog index 47e242062..24fe88839 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-01-28 Moritz Bunkus + + * mkvextract: bug fix: Modes 'attachments', 'chapters', 'tags' and + 'cuesheet': mkvextract will output an error message if the file + cannot be opened (e.g. because it does not exist or due to lack of + access). + 2010-01-24 Moritz Bunkus * mmg: enhancement: Changing the interface language does not diff --git a/src/extract/attachments.cpp b/src/extract/attachments.cpp index 0e21cf2e9..bc6663c58 100644 --- a/src/extract/attachments.cpp +++ b/src/extract/attachments.cpp @@ -113,7 +113,8 @@ extract_attachments(const std::string &file_name, // open input file try { analyzer = kax_analyzer_cptr(new kax_analyzer_c(file_name)); - analyzer->process(parse_mode); + if (!analyzer->process(parse_mode)) + throw false; } catch (...) { show_error(boost::format(Y("The file '%1%' could not be opened for reading (%2%).")) % file_name % strerror(errno)); return; diff --git a/src/extract/chapters.cpp b/src/extract/chapters.cpp index e58e4031d..9bbc278fd 100644 --- a/src/extract/chapters.cpp +++ b/src/extract/chapters.cpp @@ -46,7 +46,8 @@ extract_chapters(const std::string &file_name, // open input file try { analyzer = kax_analyzer_cptr(new kax_analyzer_c(file_name)); - analyzer->process(parse_mode); + if (!analyzer->process(parse_mode)) + throw false; } catch (...) { show_error(boost::format(Y("The file '%1%' could not be opened for reading (%2%).")) % file_name % strerror(errno)); return; diff --git a/src/extract/cuesheets.cpp b/src/extract/cuesheets.cpp index 34a05ee69..95d159c24 100644 --- a/src/extract/cuesheets.cpp +++ b/src/extract/cuesheets.cpp @@ -203,7 +203,8 @@ extract_cuesheet(const std::string &file_name, // open input file try { analyzer = kax_analyzer_cptr(new kax_analyzer_c(file_name)); - analyzer->process(parse_mode); + if (!analyzer->process(parse_mode)) + throw false; } catch (...) { show_error(boost::format(Y("The file '%1%' could not be opened for reading (%2%).")) % file_name % strerror(errno)); return; diff --git a/src/extract/tags.cpp b/src/extract/tags.cpp index 101ef8abc..5b1a047da 100644 --- a/src/extract/tags.cpp +++ b/src/extract/tags.cpp @@ -46,7 +46,8 @@ extract_tags(const std::string &file_name, // open input file try { analyzer = kax_analyzer_cptr(new kax_analyzer_c(file_name)); - analyzer->process(parse_mode); + if (!analyzer->process(parse_mode)) + throw false; } catch (...) { show_error(boost::format(Y("The file '%1%' could not be opened for reading (%2%).")) % file_name % strerror(errno)); return;