Repository navigation
os9: refuse a space in an OS-9 file name - #108
Merged
Merged
Conversation
NitrOS-9 ends a name at a space, so a file whose name holds one cannot be named on its command line, and the shell has no quoting to get round that. The os9 tool still let copy and rename create such names. Drop the space from the characters _os9_prsnam accepts, and test it. A file that already has a space can still be renamed to a legal name.
DrPitre
approved these changes
Nov 8, 2026
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.
NitrOS-9 ends a file name at a space: F$PrsNam stops there, and the shell splits its arguments on spaces with no quoting to get round it. So a file whose name holds a space can be listed, but it cannot be named on an OS-9 command line to open, delete or rename.
os9 copyandos9 renamecould still create such names, because_os9_prsnamaccepted a space. This drops the space from the characters it accepts.os9 copy "a b" disk.dsk,"a b"now fails with error 215 (badly formed pathname).os9 rename disk.dsk,"a b" abstill renames it to a legal name, as only the new name is checked.unittest/libsystest.cgains a test for a space at the start, middle and end of a name.Tested:
makeandmake -C build/unix/unittest testall(all suites pass) on macOS, plus the copy and rename cases above by hand.