diff --git a/core/bbs.js b/core/bbs.js index 56b24efc..f29369cc 100644 --- a/core/bbs.js +++ b/core/bbs.js @@ -78,7 +78,7 @@ function bbsMain() { ], function complete(err) { if(err) { - logger.log.error(err); + console.error('Error initializing: ' + util.inspect(err)); } } ); diff --git a/core/scanner_tossers/ftn_bso.js b/core/scanner_tossers/ftn_bso.js index 2582c279..18ef9f45 100644 --- a/core/scanner_tossers/ftn_bso.js +++ b/core/scanner_tossers/ftn_bso.js @@ -15,13 +15,13 @@ let Message = require('../message.js'); let moment = require('moment'); let _ = require('lodash'); let paths = require('path'); -let mkdirp = require('mkdirp'); let async = require('async'); let fs = require('fs'); let later = require('later'); let temp = require('temp').track(); // track() cleans up temp dir/files for us let assert = require('assert'); let gaze = require('gaze'); +let fse = require('fs-extra'); exports.moduleInfo = { name : 'FTN BSO', @@ -627,7 +627,7 @@ function FTNMessageScanTossModule() { async.waterfall( [ function createOutgoingDir(callback) { - mkdirp(outgoingDir, err => { + fse.mkdirs(outgoingDir, err => { callback(err); }); }, @@ -680,13 +680,13 @@ function FTNMessageScanTossModule() { outgoingDir, `${paths.basename(oldPath, 'pk_')}${ext}`); - fs.rename(oldPath, newPath, nextFile); + fse.move(oldPath, newPath, nextFile); } else { const newPath = paths.join(outgoingDir, paths.basename(oldPath)); - fs.rename(oldPath, newPath, err => { + fse.move(oldPath, newPath, err => { if(err) { Log.warn( - { oldPath : oldPath, newPath : newPath }, + { oldPath : oldPath, newPath : newPath, error : err.toString() }, 'Failed moving temporary bundle file!'); return nextFile(); diff --git a/docs/index.md b/docs/index.md index ed848949..181de7a2 100644 --- a/docs/index.md +++ b/docs/index.md @@ -44,30 +44,33 @@ openssl genrsa -des3 -out ./misc/ssh_private_key.pem 2048 The main system configuration is handled via `~/.config/enigma-bbs/config.hjson`. This is a [HJSON](http://hjson.org/) file (compiliant JSON is also OK). See [Configuration](config.md) for more information. ```hjson -general: { - boardName: Super Awesome BBS -} +{ + general: { + boardName: Super Awesome BBS + } -servers: { - ssh: { - privateKeyPass: YOUR_PK_PASS - enabled: true /* set to false to disable the SSH server */ - } -} + servers: { + ssh: { + privateKeyPass: YOUR_PK_PASS + enabled: true /* set to false to disable the SSH server */ + } + } -messageConferences: { - local_general: { - name: Local - desc: Local Discussions - default: true + messageConferences: { + local_general: { + name: Local + desc: Local Discussions + default: true - areas: { - local_music: { - name: Music Discussion - desc: Music, bands, etc. - default: true - } - } + areas: { + local_music: { + name: Music Discussion + desc: Music, bands, etc. + default: true + } + } + } + } } ``` diff --git a/package.json b/package.json index 0d1389ff..244bcaf5 100644 --- a/package.json +++ b/package.json @@ -30,7 +30,8 @@ "sqlite3": "^3.1.1", "ssh2": "^0.4.13", "string-format": "davidchambers/string-format#mini-language", - "temp": "^0.8.3" + "temp": "^0.8.3", + "fs-extra" : "0.26.x" }, "engines": { "node": ">=0.12.2"