Fairlight CMI: do not write voice files into a hard-coded folder - #343
Open
douglas-carmichael wants to merge 1 commit into
Open
Fairlight CMI: do not write voice files into a hard-coded folder#343douglas-carmichael wants to merge 1 commit into
douglas-carmichael wants to merge 1 commit into
Conversation
Reading a Voice file whose version is not recognized wrote a copy of that file to "C:\Users\mos\Desktop\Output" before reporting the error - leftover debug output which shipped. On Windows it silently fills that folder on the one machine which has it and, where it does not exist, the resulting NoSuchFileException replaces the intended 'unsupported version' message with a confusing file-not-found error. On macOS and Linux a backslash is an ordinary file name character, so the whole path becomes the name of a file created in the current working directory: analysing the CMI IIx library images drops 76 such files next to whatever the user happened to be working in. Analysing a source is expected to write nothing, which now holds again. The unsupported version is still reported by the exception which follows. Verified against the CMI IIx library images: unpatched, 76 files appear in the working directory; with this change none do, the same 1154 voices are analysed and the 4 unsupported-version errors are reported unchanged.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reading a Voice file whose version is not recognized writes a copy of that file to
C:\Users\mos\Desktop\Outputbefore the error is reported — leftover debug output inFairlightCmi3Detector.readVoice:Analysing a source is expected to write nothing, and on three platforms it does something different:
C:\Users\mos\Desktop\Output\….VCnext to whatever the user was working in.Files.writethrowsNoSuchFileExceptionfirst, so the user gets a file-not-found error instead of the intended "unsupported version" message.The line is removed; the exception which follows still reports the unsupported version.
Measured against the CMI IIx library images (
-s CMI3 -d WAV -a), running from the working directory:Standard output and error output are byte-identical to a build of current
main, so nothing but the stray writes changes.