[1872] in Athena Bugs

home help back first fref pref prev next nref lref last post

delete bug-fixes

daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Wed Mar 8 10:01:44 1989

Date: Wed, 8 Mar 89 10:01:20 EST
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: rel-eng@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU
Cc: qjb@ATHENA.MIT.EDU

  The following bugs have been fixed in delete etc.:

		      *************************

				 BUG:

lsdel exits with exit status 1 if there is nothing to list:

**=> soup:/mit/qjb <=**
% attach -m /mnt bldge40test-rtsys-61b
bldge40test-rtsys-61b: NFS mounted AENEAS.MIT.EDU:/expacks/rtsys61a on /mnt (read-only)
**=> soup:/mit/qjb <=**
% /mnt/bin/athena/lsdel
lsdel: .: nothing to list
Exit 1               /mnt/bin/athena/lsdel

This is not the correct behavior as having nothing to list is not an
error conditition.

				 FIX:

  Lsdel now prints nothing if a command-line argument given to it is a
directory name and there is nothing deleted in it.  If a command-line
argument is a filename with no wildcards that does not exist, "not
found" is printed.  If a command-line argument is a filename with
wildcards that doesn't match to anything, "no match" is printed.  In
all cases, the status returned is 0.

		      *************************

				 BUG:

delete -f exists with exit status of 1 when the file does not exist:

**=> (primary) soup:/mit/qjb <=**
% ls /tmp/a
/tmp/a not found
**=> (primary) soup:/mit/qjb <=**
% \rm -f /tmp/a
**=> (primary) soup:/mit/qjb <=**
% \delete -f /tmp/a
Exit 1               delete -f /tmp/a

				 FIX:

  Delete -f now always exits with exit status 0.

		      *************************

				 BUG:

expunge exits with status 1 when there is nothing to expunge (like
lsdel).  

**=> (primary) soup:/mit/qjb <=**
% expunge 
expunge: .: nothing to expunge
Exit 1               expunge

				 FIX:

  Same as for lsdel (above).

		      *************************

				 BUG:
Growl.

Do you wish to continue? 
Exit 2               purge

				 FIX:

  I do not agree that this is a bug.  Standard behavior for programs
that ask for confirmation is, to quote from the rm(1) man page, "If
that line begins with `y' the file is deleted, otherwise the file
remains."  I think that that's the right way to do things.

		      *************************

  Sources with these fixes installed can be found in ~jik/src/delete.
The following files are affected:
  delete.c
  directories.c
  expunge.c
  lsdel.c
  pattern.c
  util.c
Everything should be checked in, so you can just copy the whole source
tree if you want.

jik

home help back first fref pref prev next nref lref last post