From: wht@n4hgf.uucp (Warren Tucker)
Newsgroups: alt.sources
Subject: shar321/patch01 ... corrected
          Like, '=' should have been '==' on line 120
Message-ID: <676@n4hgf.uucp>
Date: 20 Apr 90 18:03:21 GMT
References: <659@n4hgf.uucp>
Sender: wht@n4hgf.uucp
Organization: Amateur Radio Station N4HGF, Mountain Park, GA
Lines: 55
X-Checksum-Snefru: a80d4a9c fa16a2e1 3238de53 3c589313

Submitted-by: wht%n4hgf@gatech.edu
Archive-name: shar321/patch01

This ought to do it for a while.  I'm sure the net has more
interesting things to do than belabor this.  I got 31 requests
for shar, which is the largest amount of mail I've ever received
on a single subject.  So, if you are interested in shars, e-mail me
and I'll managle/manage a mailing list.

>Subject: bug in shar321
>Date: Fri, 20 Apr 90 10:29:40 -0100
>From: Colas Nahaboo <gatech!mailrus!uunet!avahi.inria.fr!colas>
>Status: ORS
>
>unshar need to check if the file argument is not an absolute path: otherwise,
>when saying, in directory /foo: "unshar /bar/gee.shar", it will try to open the
>file /foo/bar/gee.shar
>
>This patch corrects it.

avahi$ diff -c unshar.c.orig unshar.c
*** unshar.c.orig       Fri Apr 20 09:23:10 1990
--- unshar.c    Fri Apr 20 09:25:07 1990
***************
*** 117,125
  	{
  		for(i= optind; i < argc; ++i)
  		{
! 			strcpy(s1024,argvdir);
! 			strcat(s1024,"/");
! 			strcat(s1024,argv[i]);
  			if(!(in = fopen(s1024,"r")))
  			{
  				perror(s1024);

--- 117,129 -----
  	{
  		for(i= optind; i < argc; ++i)
  		{
! 			if(argv[i][0] == '/') {
! 				strcpy(s1024,argv[i]);
! 			} else {
! 				strcpy(s1024,argvdir);
! 				strcat(s1024,"/");
! 				strcat(s1024,argv[i]);
! 			}
  			if(!(in = fopen(s1024,"r")))
  			{
  				perror(s1024);

Colas Nahaboo, BULL Research FRANCE -- Koala Project -- GWM X11 Window Manager
colas@mirsa.inria.fr            Phone: (33) 93.65.77.70, Fax: (33) 93 65 77 66
INRIA - Sophia Antipolis, 2004, rte des Lucioles, 06565 Valbonne Cedex, FRANCE
 
------------------------------------------------------------------
Warren Tucker, TuckerWare gatech!n4hgf!wht or wht%n4hgf@gatech.edu
McCarthyism did to cinema what ANSI did to C,  cast a great number
of characters into the void.
