1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-05 00:23:56 +01:00

Fixes silent failures for a few exporters

One example is if a user tries to export a file to an invalid file or
is not permitted to write to it.  For the FFmpeg, MP2, and OGG exporters
this error would not be flagged and to the user, it would look like the
file was exported.

These now throw up an error dialog to left the user know.
This commit is contained in:
lllucius@gmail.com
2014-12-06 12:06:48 +00:00
parent 40ec0eda12
commit 42452cc1da
2 changed files with 36 additions and 22 deletions

View File

@@ -27,14 +27,14 @@ FileIO::FileIO(const wxString name, FileIOMode mode)
if (mMode == FileIO::Input) {
mInputStream = new wxFFileInputStream(mName);
if (mInputStream == NULL) {
if (mInputStream == NULL || !mInputStream->IsOk()) {
wxPrintf(wxT("Couldn't get input stream: %s\n"), name.c_str());
return;
}
}
else {
mOutputStream = new wxFFileOutputStream(mName);
if (mOutputStream == NULL) {
if (mOutputStream == NULL || !mOutputStream->IsOk()) {
wxPrintf(wxT("Couldn't get output stream: %s\n"), name.c_str());
return;
}