mirror of
https://github.com/cc65/cc65.git
synced 2025-01-01 03:30:20 +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:
parent
5fe9e2c3b3
commit
55b56b2475
@ -96,7 +96,7 @@ parmok: jsr popax ; Get flags
|
|||||||
|
|
||||||
; Invalid open mode
|
; Invalid open mode
|
||||||
|
|
||||||
lda #EINVAL
|
einval: lda #EINVAL
|
||||||
|
|
||||||
; Error entry. Sets _errno, clears _oserror, returns -1
|
; Error entry. Sets _errno, clears _oserror, returns -1
|
||||||
|
|
||||||
@ -119,11 +119,14 @@ closeandexit:
|
|||||||
|
|
||||||
oserror:jmp __mappederrno
|
oserror:jmp __mappederrno
|
||||||
|
|
||||||
|
|
||||||
; Read bit is set. Add an 'r' to the name
|
; 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
|
jsr fnaddmode ; Add the mode to the name
|
||||||
lda #LFN_READ
|
isdir: lda #LFN_READ
|
||||||
bne common ; Branch always
|
bne common ; Branch always
|
||||||
|
|
||||||
; If O_TRUNC is set, scratch the file, but ignore any errors
|
; If O_TRUNC is set, scratch the file, but ignore any errors
|
||||||
|
Loading…
Reference in New Issue
Block a user