Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

PATCH: Functions/checkmail



Zero length files always have access time not later than modification
time, therefore checkmail always reported zero length folders as new.
This patch should also be applied to 3.0.5.

Zoltan


*** Functions/checkmail.orig	Tue Feb 11 08:23:47 1997
--- Functions/checkmail	Sun May 10 15:14:20 1998
***************
*** 22,28 ****
  		if (($#file)) then
  			checkmail "${^file}\?$message"
  		fi
! 	elif test -N "$file"; then  # this also sets $_ to $file
  		print -r -- "${(e)message:-You have new mail.}"
  	fi
  done
--- 22,28 ----
  		if (($#file)) then
  			checkmail "${^file}\?$message"
  		fi
! 	elif test -s "$file" -a -N "$file"; then  # this also sets $_ to $file
  		print -r -- "${(e)message:-You have new mail.}"
  	fi
  done



Messages sorted by: Reverse Date, Date, Thread, Author