Investigate filename validation in start.js
grumpyinca opened this issue · comments
In release 0.5, the syntax:
start checkpt
is handled correctly. The syntax
start checkpt.dsn
is not.
The PL/I code does the necessary validation to avoid the issue. See the comparison of expected_dos.txt and expected_out.txt.
Merged into master, closing
Current operation illustrated in actual_out.txt follows. The "err= …" below is considered "as designed". However, the PL/I code strips the ".DSN" and successfully reads the file. It would be good if the JS code would do the same.
PCyl: start checkpt.dsn
START:
RETAIN CURRENT INTERNAL VARIABLES & OPTIONS ? (y/N) :
INTERNAL VARIABLES & OPTIONS HAVE BEEN SET.
READING STARTUP FILE CHECKPT.DSN.DSN ...
err=Error: ENOENT: no such file or directory, open 'C:\Users\Mike\git\pcyl\CHECKPT.DSN.DSN'
CHECKPT.DSN.DSN IS NOT A VALID FILE NAME.
PLEASE INVOKE THE START COMMAND WITH A VALID FILE NAME.
PCyl:
One more time... merged into master, awaiting your review to close it.
I compared an updated actual_out.txt with the immediately preceding expected_out.txt and observed the desired operation. Closing.