File tree Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Expand file tree Collapse file tree 1 file changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -49,6 +49,7 @@ if (!program.html && !program.email && !program.index) {
4949// setup global variables
5050const dstDir = path . resolve ( path . join ( program . directory ) ) ;
5151const logFile = path . resolve ( dstDir , 'irc.log' ) ;
52+ const changesLogFile = path . resolve ( dstDir , 'changes.log' ) ;
5253const audioFile = path . resolve ( dstDir , 'audio.ogg' ) ;
5354const indexFile = path . resolve ( dstDir , 'index.html' ) ;
5455const minutesDir = path . join ( dstDir , '/..' ) ;
@@ -130,7 +131,15 @@ async.waterfall([ function(callback) {
130131 } ) ;
131132} , function ( callback ) {
132133 // read the IRC log file
133- fs . readFile ( logFile , 'utf8' , callback ) ;
134+ let log = fs . readFileSync ( logFile , 'utf8' ) ;
135+ // read the changes log file if it exists
136+ try {
137+ log += '\n' ;
138+ log += fs . readFileSync ( changesLogFile , 'utf8' ) ;
139+ } catch ( e ) {
140+ // ignore if the file doesn't exist
141+ }
142+ callback ( null , log ) ;
134143} , function ( data , callback ) {
135144 gLogData = data ;
136145 // generate the index.html file
You can’t perform that action at this time.
0 commit comments