diff --git a/mbfido/addpkt.c b/mbfido/addpkt.c index 1f68e301..25094e2f 100644 --- a/mbfido/addpkt.c +++ b/mbfido/addpkt.c @@ -297,7 +297,12 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch fprintf(fp, "%s%c", tname, '\0'); fprintf(fp, "%s%c", fname, '\0'); - fprintf(fp, "%s%c", subj, '\0'); + if (flags & M_FILE) { + Syslog('-', "change %s to %s", subj, basename(subj)); + fprintf(fp, "%s%c", basename(subj), '\0'); + } else { + fprintf(fp, "%s%c", subj, '\0'); + } fsync(fileno(fp)); return 0; } diff --git a/mbfido/queue.c b/mbfido/queue.c index 3d3f3eb2..e2975c8d 100644 --- a/mbfido/queue.c +++ b/mbfido/queue.c @@ -49,7 +49,6 @@ extern pid_t mypid; /* * Internal version of basename to make this better portable. */ -char *Basename(char *); char *Basename(char *str) { char *cp = strrchr(str, '/'); diff --git a/mbfido/queue.h b/mbfido/queue.h index c4c24a88..4b83513c 100644 --- a/mbfido/queue.h +++ b/mbfido/queue.h @@ -4,6 +4,7 @@ /* $Id$ */ +char *Basename(char *); void flush_queue(void);