Re: [PATCH v6 1/6] submodules: add helper functions to determine presence of submodules
- From
Stefan Beller <sbeller@google.com>
- Date
- Dec 2, 2016, 19:28 UTC
- Message-ID
- <CAGZ79kYPpc0=NAJaNPW+8faszOPAkq=b3m-EopY5A8oFwh+9=g@mail.gmail.com>
- In-Reply-To
- <CA+P7+xoi_UNSv-dKVFWf7T4o3uBtGa0wR6=nnYX+kjzLAmw6ug@mail.gmail.com>
On Fri, Dec 2, 2016 at 11:20 AM, Jacob Keller <jacob.keller@gmail.com> wrote:
Show 13 quoted lines
>> >> So is there a reason why the library function realpath() can't be used? >> From a cursory look at its man page it seems to do the symlink >> resolution. >> >> -- >> Brandon Williams > > I believe it uses the same method and thus wouldn't actually resolve > the issue. But I'm not really 100% sure on this. > > Thanks, > Jake
I just reviewed 2 libc implementations (glibc and an Android libc) and both of them do not use chdir internally, but use readlink and compose the path 'manually' c.f. http://osxr.org:8080/glibc/source/stdlib/canonicalize.c?v=glibc-2.13