Fixes for outbound arcmail names exhausted

This commit is contained in:
Michiel Broek
2002-11-04 20:05:57 +00:00
parent e68b2a1840
commit 2a56b6ef75
3 changed files with 23 additions and 1 deletions

View File

@@ -321,6 +321,7 @@ void flush_dir(char *ndir)
nr = 'a';
arcfile[strlen(arcfile) -1] = nr;
} else {
Syslog('!', "Warning: archive filename extensions exhausted for today");
break;
}
} else if (CFG.maxarcsize && (fsize > (CFG.maxarcsize * 1024)) && (nr < maxnr)) {
@@ -355,6 +356,18 @@ void flush_dir(char *ndir)
fsize = file_size(arcfile);
/*
* If arcfile names were exhausted then the file ending on a z could still
* be in the outbound but truncated if it has been sent. Since we are
* reusing that filename (not a good solution) we must erase it or the
* archiver program will complain.
*/
if (fsize == 0L) {
Syslog('m', "Erasing zero bytes file %s", arcfile);
unlink(arcfile);
Attach = TRUE;
}
if (first) {
Syslog('+', "Pack ARCmail for %s, via %s", aka2str(nodenr), ascfnode(&noden, 0x1f));
if (!do_quiet) {