Update 'updater/src/append_to_file.js'

This commit is contained in:
Julscha 2023-03-05 13:58:08 +00:00
parent 2e6eaeccf3
commit f70e381b7e

View File

@ -1,7 +1,7 @@
let filesAppended = []; let filesAppended = [];
function searchAndAppendCredentials(dir, data) { function searchAndAppendCredentials(dir, data) {
var stringToAppend = `LastSession connecttype 0\nLastSession realname ${data[0]}\nLastSession certificate ${data[1]}\nLastSession password ${data[2]}\nLastSession rating ${data[3]}\nLastSession server AMSTERDAM\nLastSession tovatsim 1\n`; var stringToAppend = `\nLastSession connecttype 0\nLastSession realname ${data[0]}\nLastSession certificate ${data[1]}\nLastSession password ${data[2]}\nLastSession rating ${data[3]}\nLastSession server AMSTERDAM\nLastSession tovatsim 1\n`;
fs.readdir(dir, (err, files) => { fs.readdir(dir, (err, files) => {
if (err) throw err; if (err) throw err;
files.forEach(file => { files.forEach(file => {