Every minute it check free disk space.
It uses new module - diskspace - works on Windows Linux and Mac.
If the partition where Rambox is installed has < 1 GB available space:
- a warning dialog appears with info about:
-- remaining space
-- rambox/electron installation path
-- OK button which quits Rambox
No matter how the dialog is dismissed, it will quit Rambox.
// optionally render this information also in rambox window
try{
const{available}=awaitdisk.check(appPath);
if(available<1073741824){// 1 GB
constoptions={
type:'warning',
buttons:['OK, quit'],
defaultId:0,
title:`Running out of disk space! - Rambox shutting down`,
detail:`You've got just ${formatBytes(available)} space left.\n\nRambox has been frozen to prevent settings corruption.\n\nOnce you quit this dialog, Rambox will shutdown.\n\n1 GB of avalable disk space is required.\nFree up space on partition where Rambox is installed then start the app again.\n\nRambox path: \n${appPath}`,
message:`Running out of disk space! - Rambox shutting down`,