From 661c32dcff236d06903014c8583c062ab8f31033 Mon Sep 17 00:00:00 2001 From: Gurucharan Shetty Date: Mon, 10 Mar 2014 09:16:08 -0700 Subject: [PATCH] util: Maximum path length for Windows. Signed-off-by: Gurucharan Shetty Acked-by: Ben Pfaff --- lib/util.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/util.c b/lib/util.c index 911cc3e34..68a1ce6ea 100644 --- a/lib/util.c +++ b/lib/util.c @@ -646,7 +646,11 @@ get_cwd(void) size_t size; /* Get maximum path length or at least a reasonable estimate. */ +#ifndef _WIN32 path_max = pathconf(".", _PC_PATH_MAX); +#else + path_max = MAX_PATH; +#endif size = (path_max < 0 ? 1024 : path_max > 10240 ? 10240 : path_max); -- 2.43.0