mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2025-12-23 22:37:53 -05:00
Only update storage DiskSpace if assigned an area
This commit is contained in:
@@ -419,7 +419,7 @@ sub delete {
|
||||
$ZoneMinder::Database::dbh->commit() if ! $in_transaction;
|
||||
|
||||
my $storage = $event->Storage();
|
||||
if ($event->DiskSpace()) {
|
||||
if ($event->DiskSpace() and $storage->Id()) {
|
||||
$storage->lock_and_load();
|
||||
$storage->save({DiskSpace=>$storage->DiskSpace()-$event->DiskSpace()});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user