BinaryStream.Open bug in 2016R4.1 ?

I got a simple code to read a file using BinaryStream. I’m on OSX El Captain always returning me Error (cede number 2, no message)

For i as Integer=0 to mFiles.Ubound //mFiles is a string array with native path to the file... dim f as new FolderItem(mFiles(i)) //if f.IsReadable = false then continue try bs = BinaryStream.Open(f,False) catch e as IOException continue end try If bs = Nil Then Continue Next
I’m completely stuck!!

I think the problem is that the default path type in the folder item constructor is “absolute”.

If the array actually contains native paths, try this:

dim f as new FolderItem(mFiles(i), folderItem.PathTypeNative)

Thanks Peter.It solved … in older Xojo versions It was not necessary to specify the second parameter (do I’m wrong ?)

As I recall, it’s been this way for some time. Of course, if you use absolute paths, you don’t need to specify that second parameter…