[ Return to Bugs & Features | Roadmap 1.1 ]
|Status:||1 - Closed w/Resolution|
|Priority:||2 - Low, e.g. a documentation error or undocumented side-effect|
|Scope:||2 - Specific to an operating system|
|Summary:||fl_filename_list filenames inconsistent|
|Fix Version:||1.1.7 (SVN: v4525)|
Trouble Report Files:
Trouble Report Comments:
06:35 May 19, 2005
|Reference STR #854 for the original report. |
On WIN32, fl_filename_list() returns directories with a trailing slash.
On POSIX (Linux, UNIX, OSX, etc.), fl_filename_list() returning directories *without* a trailing slash.
The current behavior is an optimization on Windows to avoid extra stat() calls in the file chooser. We could add a stat() call for the POSIX version of fl_filename_list() to add a trailing slash for directories returned in the results. This would be more consistent for the API, but might have side-effects for current users.
Thoughts and comments are welcome, we will use this STR to track the issue and document the consensus of all users.
01:53 Jul 16, 2005
|IIRC, adding a slash inside a patth name does not harm on Unix style systems (/usr/foo == /usr//foo). But some minor issues may of course still pop up. |
I do like the idea of getting around the stat call.
13:15 Aug 15, 2005
|Are there any opinions on this? Implementing it is easy, but the code will be somewhat slower since the results from the builtin 'dirent' have to be checked via 'stat' and slashes have to be appended if needed. I personally do like the feature as it will keep me from implementing some non cross-platform stat call in 90% of the cases where I list a directory... . ||
13:17 Aug 15, 2005
|Since the primary consumer of the fl_filename_list() output is the file chooser, and since it must do a stat call each time it loads the list, it makes sense to put the code in one place (IIRC, the icon lookup code will use the trailing slash already...) ||
15:04 Aug 17, 2005
|This change is controversial. It changes the behavior of fl_filename_list |
slightly by adding a forward slash after every directory name on every
supported OS. Included in this patch is a change in the code that
lists mounted volumes on OS X Mac.
Apple users, please check. Open FLUID, open the file dialog and
clear the current path. You shoudl see a list of mounted volumes.
As usual with this kind of changes, if it seems critical, I am not mad or anything if the developers decide to reverse this change ;-)
[ Return to Bugs & Features ]