Date: Wed, 3 Mar 2010 16:10:08 GMT From: dfilter@FreeBSD.ORG (dfilter service) To: freebsd-bugs@FreeBSD.org Subject: Re: bin/89410: commit references a PR Message-ID: <201003031610.o23GA82V008522@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/89410; it has been noted by GNATS. From: dfilter@FreeBSD.ORG (dfilter service) To: bug-followup@FreeBSD.org Cc: Subject: Re: bin/89410: commit references a PR Date: Wed, 3 Mar 2010 16:06:52 +0000 (UTC) Author: jh Date: Wed Mar 3 16:06:43 2010 New Revision: 204637 URL: http://svn.freebsd.org/changeset/base/204637 Log: MFC r204276: Fix expansion of \W in prompt strings when the working directory is "/". The prompt string was truncated after \W when the working directory was "/". PR: bin/89410 Modified: stable/8/bin/sh/parser.c Directory Properties: stable/8/bin/sh/ (props changed) Modified: stable/8/bin/sh/parser.c ============================================================================== --- stable/8/bin/sh/parser.c Wed Mar 3 15:43:26 2010 (r204636) +++ stable/8/bin/sh/parser.c Wed Mar 3 16:06:43 2010 (r204637) @@ -1631,7 +1631,7 @@ getprompt(void *unused __unused) case 'w': ps[i] = '\0'; getcwd(&ps[i], PROMPTLEN - i); - if (*fmt == 'W') { + if (*fmt == 'W' && ps[i + 1] != '\0') { /* Final path component only. */ trim = 1; for (j = i; ps[j] != '\0'; j++) _______________________________________________ svn-src-all@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/svn-src-all To unsubscribe, send any mail to "svn-src-all-unsubscribe@freebsd.org"
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201003031610.o23GA82V008522>