mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-03-13 11:26:59 -04:00
force reload on Storage in Event object when moving
This commit is contained in:
@@ -487,7 +487,7 @@ sub MoveTo {
|
||||
return "Event has already been moved by someone else.";
|
||||
}
|
||||
|
||||
my $OldStorage = $self->Storage();
|
||||
my $OldStorage = $self->Storage(undef);
|
||||
my ( $OldPath ) = ( $self->Path() =~ /^(.*)$/ ); # De-taint
|
||||
|
||||
$$self{Storage} = $NewStorage;
|
||||
@@ -535,6 +535,7 @@ sub MoveTo {
|
||||
for my $file (@files) {
|
||||
next if $file =~ /^\./;
|
||||
( $file ) = ( $file =~ /^(.*)$/ ); # De-taint
|
||||
Debug("Moving file $file to $NewPath");
|
||||
if ( ! File::Copy::copy( $file, $NewPath ) ) {
|
||||
$error .= "Copy failed: for $file to $NewPath: $!";
|
||||
last;
|
||||
|
||||
Reference in New Issue
Block a user