Unable to use file commands in v6
Posted: Wed Dec 04, 2024 4:18 pm
Hello ! Been using PB 5.72 until recently, and after upgrading I've been having a weird issue : I can't open files at all.
OpenFile and Reafile will always return a non-null value, regardless of whether the file exists, and then any file-reading function (including Eof) will crash with "The specified #File is not initialized".
This is happening with all versions starting with 6.0.0, same code works fine in 5.72, and tested on multiple computers, including one where all installs are fresh.
Is there something I'm missing ?
Code example I tested with just in case, but this happens with my existing projects as well
OpenFile and Reafile will always return a non-null value, regardless of whether the file exists, and then any file-reading function (including Eof) will crash with "The specified #File is not initialized".
This is happening with all versions starting with 6.0.0, same code works fine in 5.72, and tested on multiple computers, including one where all installs are fresh.
Is there something I'm missing ?
Code example I tested with just in case, but this happens with my existing projects as well
Code: Select all
file.l = OpenFile(#PB_Any, "C:\msys64\ucrt64.ini") ; Using this file because it was the first very short path that came to mind, tested with other various files
Debug file ;will always display a non-null value
If Not file
Debug "404"
End
Endif
ReadString(file, #PB_UTF8, 20) ;Will crash here, apparently the file is not initialized ; tested with other functions, including Eof