1
0
mirror of https://github.com/cc65/cc65.git synced 2024-12-28 06:30:16 +00:00

Fixed a bug: The floppies do not like ,R (for read mode) when opening the

directory.


git-svn-id: svn://svn.cc65.org/cc65/trunk@5804 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
uz 2012-08-05 21:32:40 +00:00
parent 5fe9e2c3b3
commit 55b56b2475

View File

@ -96,7 +96,7 @@ parmok: jsr popax ; Get flags
; Invalid open mode
lda #EINVAL
einval: lda #EINVAL
; Error entry. Sets _errno, clears _oserror, returns -1
@ -119,11 +119,14 @@ closeandexit:
oserror:jmp __mappederrno
; Read bit is set. Add an 'r' to the name
doread: lda #'r'
doread: ldy fnisfile ; File or directory?
beq isdir ; Don't add ,R for directory
lda #'r'
jsr fnaddmode ; Add the mode to the name
lda #LFN_READ
isdir: lda #LFN_READ
bne common ; Branch always
; If O_TRUNC is set, scratch the file, but ignore any errors
@ -199,4 +202,4 @@ nofile: ; ... else use SA=0 (read)
.endproc