PlanetSquires Forums
Support Forums => WinFBX - Windows Framework for FreeBASIC => Topic started by: Paul Squires on September 24, 2019, 09:34:24 PM
-
Hi Jose,
From an email that I received....
"In the CFindFile class, the IsDots function flagged a file named .1%.jpg
Probably a bad idea to have a file beginning with a dot, so I renamed it.
Nevertheless, the IsDots function should not have returned true."
-
Thanks. Code changed to:
PRIVATE FUNCTION CFindFile.IsDots () AS BOOLEAN
IF (m_FileInfo.dwFileAttributes AND FILE_ATTRIBUTE_DIRECTORY) = FILE_ATTRIBUTE_DIRECTORY THEN
IF m_FileInfo.cFileName = "." OR m_FileInfo.cFileName = ".." THEN RETURN TRUE
END IF
END FUNCTION
-
Just for the record: If a filename can legally begin with a dot,
it is interesting to note that it can't end with that character,
except, of course, for "." and ".." folders.
So...
IF ASC(FileName, LEN(FileName)) = 46 THEN this is either "." or ".."