FileType yielding incorrect values

BlitzMax Forums/BlitzMax Programming/FileType yielding incorrect values

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

FileType is returning incorrect values when checking the contents of a directory. It's stating that both folders and files are the value 0, when in fact they should be values 2 and 1 respectively.

	Local dir:Int = ReadDir("media")
	Local g:String
	Repeat
		g = NextFile(dir)
		If g = "" Then Exit
		If g = "." Or g = ".." Then Continue
		Print FileType(g) + " " + g
	Forever
	CloseDir(dir)


Results:

0 folder
0 image.png
0 textfile.txt


What's going on? Please help! :(