From 449ac87af190a022ed65fbcc02caaf41605eb5e2 Mon Sep 17 00:00:00 2001 From: Isaac Connor Date: Wed, 21 Feb 2018 14:09:12 -0500 Subject: [PATCH] force reload on Storage in Event object when moving --- scripts/ZoneMinder/lib/ZoneMinder/Event.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm index 56ecfa249..4f6721393 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Event.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Event.pm @@ -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;