Closed jwa1974 closed 1 month ago
I confirmed that this is actually a bug in the virtual disk driver, not the COPY command. Migrating this to: https://github.com/MEGA65/mega65-core/issues/842
The disk device itself is responsible for file duplications. BASIC is just issuing the DOS "C" command. This works as expected for external IEC disk drives.
Test Environment (required) You can use MEGA65INFO to retrieve this.
Describe the bug When doing a file COPY, where source and target filenames are the same (on the same disk), no error will be issued. The copy will be done, ending up with two files with the same name. Only if copying a second time, with the same names, a "FILE EXISTS" will be issued. Also, the documentation states the names must be different.
To Reproduce Steps to reproduce the behavior:
DSAVE "FILE"
.COPY "FILE" TO "FILE"
-> No error!COPY "FILE" TO "FILE"
->63,FILE EXISTS,00,00
Expected behavior The command should issue an error when source and target filenames are the same (on the same disk) the first time.
Screenshots
Additional context None.