Re: PATCH: add relative_file_name procedure to encapsulate logic for "subdir" variable
Ben Elliston <[email protected]>
| Newsgroups | gmane.comp.sysutils.dejagnu.general |
|---|---|
| Message-ID | <20181204054858.GA24528@bapbop> |
On Mon, Dec 03, 2018 at 11:29:47PM -0600, Jacob Bachmeyer wrote: > In other words, it probably should remain as "relative_file_name", > since "realpath_relative" implies a different (and more extensive > operation) as I see it. At the least, "realpath_relative" would > apply "file normalize" to both arguments unconditionally, even > though this could produce surprising results in some situations > involving edge cases with symlinks. Those edge cases would also be > hard to debug, since users bit by them may not realize that symlinks > are involved in the problem. As a pure utility procedure, > "realpath" and variants could be useful, but could be dangerous to > call from the core due to this sensitivity to the filesystem that > this patch lacks. Thanks for thinking about the suggestion -- I agree. I'm happy with that, but can we use 'filename' without an underscore? It's a very common convention and one less character to type. ;-) Cheers, Ben