add a comment about rollbacks

This commit is contained in:
Isaac Connor 2021-10-28 12:03:58 -04:00
parent a6795cd026
commit ee30c0f05e
1 changed files with 4 additions and 3 deletions

View File

@ -744,10 +744,11 @@ sub MoveTo {
$$self{StorageId} = $$NewStorage{Id}; $$self{StorageId} = $$NewStorage{Id};
$self->Storage($NewStorage); $self->Storage($NewStorage);
$error .= $self->save(); $error .= $self->save();
# Going to leave it to upper layout as to whether we rollback or not
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction; $ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
if ($error) { return $error if $error;
return $error;
}
$self->delete_files($OldStorage); $self->delete_files($OldStorage);
return $error; return $error;
} # end sub MoveTo } # end sub MoveTo