summary refs log tree commit diff
path: root/bin/dash
diff options
context:
space:
mode:
Diffstat (limited to 'bin/dash')
-rw-r--r--bin/dash/src/mail.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/dash/src/mail.c b/bin/dash/src/mail.c
index 8eacb2d0..e6baaa1b 100644
--- a/bin/dash/src/mail.c
+++ b/bin/dash/src/mail.c
@@ -52,8 +52,8 @@
 
 #define MAXMBOXES 10
 
-/* times of mailboxes */
-static time_t mailtime[MAXMBOXES];
+/* sizes of mailboxes */
+static off_t mailsize[MAXMBOXES];
 /* Set if MAIL or MAILPATH is changed. */
 static int changed;
 
@@ -70,13 +70,13 @@ chkmail(void)
 	const char *mpath;
 	char *p;
 	char *q;
-	time_t *mtp;
+	off_t *msp;
 	struct stackmark smark;
 	struct stat64 statb;
 
 	setstackmark(&smark);
 	mpath = mpathset() ? mpathval() : mailval();
-	for (mtp = mailtime; mtp < mailtime + MAXMBOXES; mtp++) {
+	for (msp = mailsize; msp < mailsize + MAXMBOXES; msp++) {
 		int len;
 
 		len = padvance_magic(&mpath, nullstr, 2);
@@ -92,16 +92,16 @@ chkmail(void)
 #endif
 		q[-1] = '\0';			/* delete trailing '/' */
 		if (stat64(p, &statb) < 0) {
-			*mtp = 0;
+			*msp = 0;
 			continue;
 		}
-		if (!changed && statb.st_mtime != *mtp) {
+		if (!changed && statb.st_size > *msp) {
 			outfmt(
 				&errout, snlfmt,
 				pathopt ? pathopt : "you have mail"
 			);
 		}
-		*mtp = statb.st_mtime;
+		*msp = statb.st_size;
 	}
 	changed = 0;
 	popstackmark(&smark);
g keys: repo.url repo.name repo.path repo.desc repo.owner Note: *Required keys are repo.url and repo.path, all others are optional *Each occurrence of repo.url starts a new repository registration *Default value for repo.name is taken from repo.url *The value of repo.url cannot contain characters with special meaning for urls (i.e. one of /?%&), while repo.name can contain anything. Example: repo.url=cgit-pub repo.name=cgit/public repo.path=/pub/git/cgit repo.desc=My public cgit repo repo.owner=Lars Hjemli repo.url=cgit-priv repo.name=cgit/private repo.path=/home/larsh/src/cgit/.git repo.desc=My private cgit repo repo.owner=Lars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-04Do not die if tag has no messageLars Hjemli Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-02-03Fix search for non-virtual urlsLars Hjemli When cgit don't use virtual urls, the current repo and page url parameters must be included in the search form as hidden input fields. Signed-off-by: Lars Hjemli <hjemli@gmail.com> 2007-01-28Update README with install/config informationLars Hjemli