Write new line separately, instead of adding to line string

pull/5/head
eliot-akira 3 years ago
parent fc1d0e0aa3
commit af1d64f6c2
  1. 3
      lib/storage.js

@ -93,7 +93,8 @@ storage.crashSafeWriteFileLines = (filename, lines, callback = () => {}) => {
flags: 'w' flags: 'w'
}) })
for (const line of lines) { for (const line of lines) {
stream.write(line+'\n') stream.write(line)
stream.write('\n')
} }
stream.close(() => cb()) stream.close(() => cb())
} catch (err) { } catch (err) {

Loading…
Cancel
Save