Something is wrong with curdir$()
pik33
Posts: 2,388
#include "dir.bi" const module$="aurora.mod" mount "/sd", _vfs_open_sdcard() chdir "/sd/mod" open "/sd/mod/"+module$ for input as #4 print geterr() close #4
The result: 0, as expected, the file exists on the card
#include "dir.bi" const module$="aurora.mod" mount "/sd", _vfs_open_sdcard() chdir "/sd/mod" print curdir$() open "/sd/mod/"+module$ for input as #4 print geterr() close #4
The result:
/sd/mod
16
#include "dir.bi" const module$="aurora.mod" mount "/sd", _vfs_open_sdcard() chdir "/sd/mod" var j=0: if j=1 then print cd$() open "/sd/mod/"+module$ for input as #4 print geterr() close #4 function cd$() as string return curdir$() end function
The result is now also 16 although curdir$ is not even called. It is sufficient to have it compiled and opening the file gives error #16 and the file is not opened at all.