Re: [PATCH] real_path: make real_path thread-safe
- From
- Brandon Williams <bmwill@google.com>
- Date
- Dec 8, 2016, 19:02 UTC
- Message-ID
- <20161208190242.GA63154@google.com>
- In-Reply-To
- <6cae7549-72f2-e591-ad48-28d449a62caf@kdbg.org>
On 12/08, Johannes Sixt wrote:
Show 8 quoted lines
> Am 08.12.2016 um 08:55 schrieb Torsten Bögershausen: > >Some conversion may be done in mingw.c: > >https://github.com/github/git-msysgit/blob/master/compat/mingw.c > >So what I understand, '/' in Git are already converted into '\' if needed ? > > Only if needed, and there are not many places where this is the > case. (Actually, I can't find one place where we do.) In particular, > typical file accesses does not require the conversion.
That's convenient, that way I don't have to worry about using '\' as a directory separator instead of '/'.
Show 7 quoted lines
>
> >It seams that we may wnat a function get_start_of_path(uncpath),
> >which returns:
> >
> >get_start_of_path_win("//?/D:/very-long-path") "/very-long-path"
>
> We have offset_1st_component().Thanks for letting me know this function exists, that makes my job a bit easier.
-- Brandon Williams