Skip to content

Commit

Permalink
Fix: show disk full error only on data logger
Browse files Browse the repository at this point in the history
  • Loading branch information
kylebonnici committed Apr 8, 2024
1 parent 31a85a0 commit 9890f79
Showing 1 changed file with 13 additions and 11 deletions.
24 changes: 13 additions & 11 deletions src/components/SidePanel/StartStop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,19 +92,21 @@ export default () => {
samplesPerSecond: DataManager().getSamplesPerSecond(),
});

const space = Math.max(
0,
await getFreeSpace(diskFullTrigger, sessionFolder)
);
if (mode === 'DataLogger') {
const space = Math.max(
0,
await getFreeSpace(diskFullTrigger, sessionFolder)
);

setFreeSpace(space);
setFreeSpace(space);

if (space === 0) {
logger.warn(
'Disk is full. Unable to start sampling. Change the disk full trigger threshold or free up disk memory.'
);
setShowDialog(false);
return;
if (space === 0) {
logger.warn(
'Disk is full. Unable to start sampling. Change the disk full trigger threshold or free up disk memory.'
);
setShowDialog(false);
return;
}
}

setShowDialog(false);
Expand Down

0 comments on commit 9890f79

Please sign in to comment.