Re: [hatari-devel] Doing Hatari 2.6.1 release -> trailing / in directory |
[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]
Hi,> File_AddSlashToEndFileName() is also called from dlgFileSelect.c to add a trailing / (or \) to directory.
>> I don't know why it was made that way, adding a trailing '/' to dir name doesn't look useful at first sight, because later dir and file are concatened with things like "%s%c%s" with %c being PATHSEP.
>> I'd rather not touch this part of the code unless someone can explain why it was made that way.
One possible reason could be differentiating between file and directory names, potentially in cases where paths could refer to things that do not necessarily exist as-is on the host file system (file selector supports e.g. selecting paths inside ZIP files).
Because impact of such change is not isolated, and may diff between OSes & C-libraries, I think finding all (potential) issues with such change (mainly missing separators) can take rather long. I.e. I think it should be done at start of major release cycle, not in a fix release.
I think such change should be done together with writing a policy on how file paths _should_ be handled within Hatari code, and review that all path handling all over Hatari code conforms to such policy.
- Eero
Mail converted by MHonArc 2.6.19+ | http://listengine.tuxfamily.org/ |