nathanbuchar / electron-settings

📝 A simple persistent user settings framework for Electron.
https://electron-settings.js.org
MIT License
817 stars 60 forks source link

windows `operation not permitted, rename ...` #169

Closed yujingxiacai closed 1 year ago

yujingxiacai commented 2 years ago

Recently, when I opened my electron-application and the program ran to store the local custom data logic, the following error was reported.( I used electron-settings to store)

Error: EPERM: operation not permitted, rename 'C:\Users\yujingxiacai\AppData\Roaming\Electron\settings.json.2501025886' -> 'C:\Users\yujingxiacai\AppData\Roaming\Electron\settings.json'

  • Opreating System: Windows 10 pro(21H2)
  • Electron Version: ^15.1.0
  • electron-settings: ^4.0.2
quanglam2807 commented 1 year ago

This is caused by upstream: https://github.com/npm/write-file-atomic/issues/28

quanglam2807 commented 1 year ago

Similar to https://github.com/nathanbuchar/electron-settings/issues/159. I think the solution is to disable atomicSave on Windows