getcwd() won't leave a error string in the buffer, unlike getwd().

This commit is contained in:
Yaroslav Tykhiy 2004-11-18 00:14:09 +00:00
parent 0e425b6c47
commit 75933089af
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=137839

View file

@ -2554,7 +2554,7 @@ pwd(void)
char *s, path[MAXPATHLEN + 1];
if (getcwd(path, sizeof(path)) == NULL)
reply(550, "%s.", path);
perror_reply(550, "Get current directory");
else {
if ((s = doublequote(path)) == NULL)
fatalerror("Ran out of memory.");