Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10 5/3/83; site umcp-cs.UUCP
Path: utzoo!linus!wivax!decvax!harpo!floyd!cmcl2!philabs!seismo!rlgvax!cvl!umcp-cs!chris
From: chris@umcp-cs.UUCP
Newsgroups: net.sources
Subject: Bug fix for makescript
Message-ID: <217@umcp-cs.UUCP>
Date: Thu, 16-Jun-83 19:46:36 EDT
Article-I.D.: umcp-cs.217
Posted: Thu Jun 16 19:46:36 1983
Date-Received: Sat, 18-Jun-83 07:49:32 EDT
Organization: Univ. of Maryland, Computer Science Dept.
Lines: 23

Oops, seems a bug crept into my makescript program.  Here's the problem,
and the fix.

Problem:
	makescript foo File_Without_Leading_Slash

generates an error about "can't change to directory /usr/foo
".  This is because there's a newline left in the directory returned
by /bin/pwd.

Fix:
	add (after the first fread call) the two lines

	if (WDir[0])
		WDir[strlen (WDir) - 1] = 0;

and the problem should go away.

				- Chris
-- 
UUCP:	{seismo,allegra,brl-bmd}!umcp-cs!chris
CSNet:	chris@umcp-cs
ARPA:	chris.umcp-cs@UDel-Relay