diff --git a/exec/fseditor.js b/exec/fseditor.js index 9fc43192ff778d7a92b2fbaf28627cbe51f91d27..1e5df600af3619724c02cd3b973cd961d9e1173e 100644 --- a/exec/fseditor.js +++ b/exec/fseditor.js @@ -1809,6 +1809,22 @@ if(input_filename==undefined) { if(argc==1 && input_filename==undefined) input_filename=argv[0]; } +else { + var all_files=directory(system.node_dir+"*"); + var newest_filedate=-Infinity; + var newest_filename; + for(var file in all_files) { + if(all_files[file].search(/quotes.txt$/i)!=-1) { + var this_date=file_date(all_files[file]); + if(this_date > newest_filedate) { + newest_filename=all_files[file]; + newest_filedate=this_date; + } + } + } + if(newest_filename != undefined) + input_filename=newest_filename; +} bbs.sys_status&=~SS_PAUSEON; bbs.sys_status|=SS_PAUSEOFF; var oldpass=console.ctrlkey_passthru;