Skip to content
Snippets Groups Projects
Commit 08fa3cb0 authored by deuce's avatar deuce
Browse files

Fix indentation, call fullpath() on outbound roots.

parent b9688f6d
No related branches found
No related tags found
No related merge requests found
// $Id$ // $Id$
// vi: tabstop=4 // vi: tabstop=8 softtabstop=8 shiftwidth=8 noexpandtab
/* /*
* Intentionally simple "Advanced BinkleyTerm Style Outbound" * Intentionally simple "Advanced BinkleyTerm Style Outbound"
* mailer. * mailer.
...@@ -863,23 +863,24 @@ function run_outbound(ran) ...@@ -863,23 +863,24 @@ function run_outbound(ran)
function addDir(dir) { function addDir(dir) {
var bdir = backslash(dir); var bdir = backslash(dir);
bdir = fullpath(bdir);
if (outbound_dirs.indexOf(bdir) == -1) outbound_dirs.push(bdir); if (outbound_dirs.indexOf(bdir) == -1) outbound_dirs.push(bdir);
} }
function addPoints(dir) { function addPoints(dir) {
var pnts = directory(backslash(dir) + '*.pnt', false); var pnts = directory(backslash(dir) + '*.pnt', false);
pnts.forEach(function (pdir) { pnts.forEach(function (pdir) {
if (pdir.search(/[\\\/][0-9a-z]{8}.pnt$/) >= 0 && file_isdir(pdir)) { if (pdir.search(/[\\\/][0-9a-z]{8}.pnt$/) >= 0 && file_isdir(pdir)) {
addDir(pdir); addDir(pdir);
} else { } else {
log(LOG_WARNING, "Unhandled/Unexpected point path '"+pdir+"'."); log(LOG_WARNING, "Unhandled/Unexpected point path '"+pdir+"'.");
} }
}); });
} }
if (file_isdir(oroot)) { if (file_isdir(oroot)) {
addDir(oroot); addDir(oroot);
addPoints(oroot); addPoints(oroot);
} else { } else {
log(LOG_NOTICE, "Skipping non-existent outbound directory: " + oroot); log(LOG_NOTICE, "Skipping non-existent outbound directory: " + oroot);
return; return;
...@@ -892,13 +893,13 @@ function run_outbound(ran) ...@@ -892,13 +893,13 @@ function run_outbound(ran)
if (ext.search(/^\.[0-9a-f]+$/) == 0) { if (ext.search(/^\.[0-9a-f]+$/) == 0) {
if (file_isdir(dir)) { if (file_isdir(dir)) {
addDir(dir); addDir(dir);
addPoints(dir); addPoints(dir);
} else { } else {
log(LOG_WARNING, "Unexpected file in outbound '"+dir+"'."); log(LOG_WARNING, "Unexpected file in outbound '"+dir+"'.");
} }
} else { } else {
log(LOG_WARNING, "Unhandled outbound '"+dir+"'."); log(LOG_WARNING, "Unhandled outbound '"+dir+"'.");
} }
}); });
}); });
log(LOG_DEBUG, "Outbound dirs: " + JSON.stringify(outbound_dirs, null, 0)); log(LOG_DEBUG, "Outbound dirs: " + JSON.stringify(outbound_dirs, null, 0));
......
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