Signed-off-by: Michael Haggerty <mhagger@alum.mit.edu>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
if (path == buf || path == next_buf)
return path;
+ if (!*path)
+ die("The empty string is not a valid path");
+
if (strlcpy(buf, path, PATH_MAX) >= PATH_MAX)
die ("Too long path: %.*s", 60, path);
test_must_fail test-path-utils absolute_path ""
'
-test_expect_failure 'real path rejects the empty string' '
+test_expect_success 'real path rejects the empty string' '
test_must_fail test-path-utils real_path ""
'