Skip to content

Commit cdd4876

Browse files
Make sure createDirectory sets Z on success
1 parent 63eef26 commit cdd4876

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/00/filesystem.asm

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,7 @@ _: ; Move DE to end of file entry
612612
ei
613613
_: pop af
614614
pop ix
615+
cp a
615616
ret
616617
.exitError:
617618
pop hl
@@ -699,12 +700,14 @@ _: push de
699700
ld de, 0
700701
.createEntry:
701702
call createDirectoryEntry
703+
jr nz, .error2
702704
inc sp \ inc sp ; pop hl
703705
pop de
704706
pop af
705707
jp po, _
706708
ei
707709
_: pop af
710+
cp a
708711
ret
709712
.error:
710713
pop hl
@@ -718,6 +721,16 @@ _: pop af
718721
or 1
719722
ld a, errFileNotFound
720723
ret
724+
.error2:
725+
inc sp \ inc sp ; pop hl
726+
pop de
727+
pop af
728+
jp po, _
729+
ei
730+
_: pop af
731+
or 1
732+
ld a, errFilesystemFull
733+
ret
721734

722735
; findNode
723736
; Finds a node in the FAT.

0 commit comments

Comments
 (0)