From af1d64f6c242c162347d01ea70ead1434d793e95 Mon Sep 17 00:00:00 2001 From: eliot-akira Date: Sat, 9 Oct 2021 11:44:48 +0200 Subject: [PATCH] Write new line separately, instead of adding to line string --- lib/storage.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/storage.js b/lib/storage.js index 0b94439..74daf08 100755 --- a/lib/storage.js +++ b/lib/storage.js @@ -93,7 +93,8 @@ storage.crashSafeWriteFileLines = (filename, lines, callback = () => {}) => { flags: 'w' }) for (const line of lines) { - stream.write(line+'\n') + stream.write(line) + stream.write('\n') } stream.close(() => cb()) } catch (err) {