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:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user