Closed linonetwo closed 5 months ago
I used to
import settings from 'electron-settings'; import * as rotateFs from 'rotating-file-stream'; //... this.settingBackupStream = rotateFs.createStream(`${settings.file()}.bak`, { size: '10M', interval: '1d', maxFiles: 3, });
And it causes
{"code":"ENOENT","errno":-4058,"level":"error","path":"C:\Users\linonetwo\AppData\Local\tidgi\app-0.9.4\20240418-0000-01-C:\Users\linonetwo\AppData\Roaming\TidGi\settings","syscall":"mkdir","timestamp":"2024-04-17T16:02:10.014Z"}
So I have to only use rotateFs.createStream('settings.json.bak', but how to control where to store this file?
rotateFs.createStream('settings.json.bak'
Use https://github.com/iccicci/rotating-file-stream?tab=readme-ov-file#path
I used to
And it causes
So I have to only use
rotateFs.createStream('settings.json.bak'
, but how to control where to store this file?