add a comment about rollbacks
This commit is contained in:
parent
b4314e5d46
commit
4122ae99a5
|
@ -744,11 +744,11 @@ sub MoveTo {
|
||||||
$$self{StorageId} = $$NewStorage{Id};
|
$$self{StorageId} = $$NewStorage{Id};
|
||||||
$self->Storage($NewStorage);
|
$self->Storage($NewStorage);
|
||||||
$error .= $self->save();
|
$error .= $self->save();
|
||||||
if ($error) {
|
|
||||||
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
|
# Going to leave it to upper layout as to whether we rollback or not
|
||||||
return $error;
|
|
||||||
}
|
|
||||||
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
|
$ZoneMinder::Database::dbh->commit() if !$was_in_transaction;
|
||||||
|
return $error if $error;
|
||||||
|
|
||||||
$self->delete_files($OldStorage);
|
$self->delete_files($OldStorage);
|
||||||
return $error;
|
return $error;
|
||||||
} # end sub MoveTo
|
} # end sub MoveTo
|
||||||
|
|
Loading…
Reference in New Issue