tinydir_file_open with filename only fails under Windows
cxong opened this issue · comments
Cong commented
i.e. if tinydir_file_open is called with say "filename.txt" it will fail, but if it is called with "./filename.txt" it will succeed.
Lautis Sun commented
http://linux.die.net/man/3/dirname
If path does not contain a slash, dirname() returns the string "." while basename() returns a copy of path.
https://msdn.microsoft.com/en-us/library/e737s6tf.aspx
If the full path does not contain a component (for example, a filename), _splitpath assigns empty strings to the corresponding buffers.
So that's the reason.