|
|
I've run into two issues with fl_filename_ext(). Using the latest github FLTK and Linux.
First, the documentation says the function returns NULL if there is no "last period". In fact, I've found the function returns the empty string in that case:
out = fl_filename_ext("/some/path/foo/"); assert(out != 0); assert(strlen(out) == 0); out = fl_filename_ext("/some/path/foo"); assert(out != 0); assert(strlen(out) == 0);
This appears to be day-zero behavior, so a minor tweak to the documentation should be all that is required.
Second, how is a hidden file/folder expected to be handled? E.g.
out = fl_filename_ext("/some/path/foo/.hidden"); will return the string ".hidden", whereas I consider the path to not have an extension.
Any thoughts? Kevin
--
You received this message because you are subscribed to the Google Groups "fltk.general" group.
To unsubscribe from this group and stop receiving emails from it, send an email to fltkgeneral+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/fltkgeneral/d07d812f-0830-4d20-ac6a-8522afec9ff9n%40googlegroups.com.
[ Direct Link to Message ] | |
|
| |