# HG changeset patch # User Chris Cannam # Date 1580899503 0 # Node ID 4b58b8f44be776242be8d1b9a48659bd39458a05 # Parent fda54e91ca05d8df7053af1c80cc335bb8235c9c If a file that looks like audio can't be opened as audio, fail immediately - don't go trying to open .wav files or whatever as sessions or annotations. That only means the error shown to the user is less helpful. diff -r fda54e91ca05 -r 4b58b8f44be7 framework/MainWindowBase.cpp --- a/framework/MainWindowBase.cpp Fri Jan 24 15:12:09 2020 +0000 +++ b/framework/MainWindowBase.cpp Wed Feb 05 10:45:03 2020 +0000 @@ -1509,8 +1509,8 @@ } } - if (audio && (status = openAudio(source, mode)) != FileOpenFailed) { - return status; + if (audio) { + return openAudio(source, mode); } else if ((status = openSession(source)) != FileOpenFailed) { return status; } else if ((status = openPlaylist(source, mode)) != FileOpenFailed) {