*COPY: skip directories

This commit is contained in:
Bobbi Webber-Manners 2021-09-16 18:26:09 -04:00
parent 77bbf375e5
commit a7299cbdbd
3 changed files with 5 additions and 2 deletions

Binary file not shown.

View File

@ -177,7 +177,7 @@ BYTE00XX BEQ BYTE00A ; OSBYTE 0,0 - generate error
RTS ; %000x1xxx host type, 'A'pple
BYTE00A BRK
DB $F7
HELLO ASC 'Applecorn MOS 2021-09-15 snapshot'
HELLO ASC 'Applecorn MOS 2021-09-16 snapshot'
DB $00 ; Unify MOS messages

View File

@ -112,6 +112,9 @@ COPYFILE >>> ENTMAIN
BRA :MAINLOOP ; Source: wildcard, dest: dir
:NOWILD
:MAINLOOP
JSR EXISTS ; See if source is file or dir
CMP #$02 ; Directory
BEQ :SKIP ; Skip directories
LDA MOSFILE2 ; Length
STA :OLDLEN
LDA :DESTTYPE ; Check dest type
@ -136,7 +139,7 @@ COPYFILE >>> ENTMAIN
:NOTDIR LDA :DESTTYPE ; Recover destination type
JSR COPY1FILE ; Copy an individual file
BCS :COPYERR
JSR WILDNEXT
:SKIP JSR WILDNEXT
BCS :NOMORE
LDA :OLDLEN ; Restore MOSFILE2
STA MOSFILE2