[net.sources.bugs] rn 4.3 patch #17

lwall@sdcrdcf.UUCP (Larry Wall) (05/24/85)

System: rn version 4.3
Patch #: 17
Priority: REALLY LOW
Subject: articles which are subdirectories should really be ignored
From: lwall@sdcrdcf (Larry Wall)

Description:
	In a newsgroup like net.micro, there is a subdirectory named 432
	for storing articles in net.micro.432.  Unfortunately this looks like
	an article number to rn, so it tries to display it.  No big deal,
	but it could be confusing.  The following patch causes rn to ignore
	"articles" that aren't regular files.

Fix:	From rn, say "| patch -d DIR", where DIR is your rn source directory.
	Outside of rn, say "cd DIR; patch <thisarticle".  If you don't have
	the patch program, apply the following by hand, or get patch.

	If patch indicates that patchlevel is the wrong version, you may need
	to apply one or more previous patches, or the patch may already
	have been applied.  See the patchlevel file to find out what has or
	has not been applied.  In any event, don't continue with the patch.

Index: patchlevel
Prereq: 16
1c1
< Patch #: 16
---
> Patch #: 17

Index: art.c
Prereq: 4.3.1.3
*** art.c.old	Thu May 23 12:01:18 1985
--- art.c	Thu May 23 12:01:45 1985
***************
*** 1,4
! /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $
   *
   * $Log:	art.c,v $
   * Revision 4.3.1.3  85/05/13  09:29:55  lwall

--- 1,4 -----
! /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $
   *
   * $Log:	art.c,v $
   * Revision 4.3.1.4  85/05/23  12:13:31  lwall
***************
*** 1,6
  /* $Header: art.c,v 4.3.1.3 85/05/13 09:29:55 lwall Exp $
   *
   * $Log:	art.c,v $
   * Revision 4.3.1.3  85/05/13  09:29:55  lwall
   * Added CUSTOMLINES option.
   * 

--- 1,9 -----
  /* $Header: art.c,v 4.3.1.4 85/05/23 12:13:31 lwall Exp $
   *
   * $Log:	art.c,v $
+  * Revision 4.3.1.4  85/05/23  12:13:31  lwall
+  * shouldn't display article that's really a subdirectory.
+  * 
   * Revision 4.3.1.3  85/05/13  09:29:55  lwall
   * Added CUSTOMLINES option.
   * 
***************
*** 97,102
      if (fstat(artfp->_file,&filestat))
  			    /* get article file stats */
  	return DA_CLEAN;
      artsize = filestat.st_size;
  			    /* from that get article size */
      sprintf(prompt_buf,

--- 100,107 -----
      if (fstat(artfp->_file,&filestat))
  			    /* get article file stats */
  	return DA_CLEAN;
+     if (filestat.st_mode & S_IFMT != S_IFREG)
+ 	return DA_NORM;
      artsize = filestat.st_size;
  			    /* from that get article size */
      sprintf(prompt_buf,