unix-sockets: use strbuf_getcwd()
commitd13a0a97e097c6a601bafc529a716477cc94dc20
authorRené Scharfe <l.s.r@web.de>
Mon, 28 Jul 2014 18:25:40 +0000 (28 20:25 +0200)
committerJunio C Hamano <gitster@pobox.com>
Mon, 28 Jul 2014 20:49:02 +0000 (28 13:49 -0700)
tree8f91df872cdc0abdc0c3d0f0f3d54f2b6b316908
parentf22a76e9110e8e31efa3781b1a3cf2b4565d9e8a
unix-sockets: use strbuf_getcwd()

Instead of using a PATH_MAX-sized buffer, which can be too small on some
file systems, use strbuf_getcwd(), which handles any path getcwd()
returns.  Also preserve the errno set by strbuf_getcwd() instead of
setting it to ENAMETOOLONG; that way a more appropriate error message
can be shown based on the actual reason for failing.

Signed-off-by: Rene Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
unix-socket.c