Skip to content
Snippets Groups Projects
Commit 532fe42e authored by rswindell's avatar rswindell
Browse files

Bug-fix: For outbound files destined for foreign zones, don't chop off the

character of the default outbound directory *unless* it is a path delimiter
(e.g. / or \) - for BSO only.
Also minor optimization: don't call mkpath() unless isdir() returns false
(on the outbound directory).
parent 56980e67
No related branches found
No related tags found
No related merge requests found
...@@ -350,7 +350,9 @@ int get_outbound(fidoaddr_t dest, char* outbound, size_t maxlen, bool fileboxes) ...@@ -350,7 +350,9 @@ int get_outbound(fidoaddr_t dest, char* outbound, size_t maxlen, bool fileboxes)
strncpy(outbound, nodecfg->outbox, maxlen); strncpy(outbound, nodecfg->outbox, maxlen);
else if(cfg.flo_mailer) { else if(cfg.flo_mailer) {
if(dest.zone != sys_faddr.zone) { /* Inter-zone outbound is "OUTBOUND.ZZZ/" */ if(dest.zone != sys_faddr.zone) { /* Inter-zone outbound is "OUTBOUND.ZZZ/" */
*lastchar(outbound) = 0; char* p = lastchar(outbound);
if(IS_PATH_DELIM(*p))
*p = 0;
safe_snprintf(outbound+strlen(outbound), maxlen,".%03x", dest.zone); safe_snprintf(outbound+strlen(outbound), maxlen,".%03x", dest.zone);
} }
if(dest.point != 0) { /* Point destination is "OUTBOUND[.ZZZ]/NNNNnnnn.pnt/" */ if(dest.point != 0) { /* Point destination is "OUTBOUND[.ZZZ]/NNNNnnnn.pnt/" */
...@@ -359,8 +361,9 @@ int get_outbound(fidoaddr_t dest, char* outbound, size_t maxlen, bool fileboxes) ...@@ -359,8 +361,9 @@ int get_outbound(fidoaddr_t dest, char* outbound, size_t maxlen, bool fileboxes)
} }
} }
backslash(outbound); backslash(outbound);
if(!isdir(outbound)) if(isdir(outbound))
lprintf(LOG_DEBUG, "Creating outbound directory for %s: %s", smb_faddrtoa(&dest, NULL), outbound); return 0;
lprintf(LOG_DEBUG, "Creating outbound directory for %s: %s", smb_faddrtoa(&dest, NULL), outbound);
return mkpath(outbound); return mkpath(outbound);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment