force reload on Storage in Event object when moving

pull/2077/head
Isaac Connor 2018-02-21 14:09:12 -05:00
parent c5081d1e4e
commit 449ac87af1
1 changed files with 2 additions and 1 deletions

View File

@ -487,7 +487,7 @@ sub MoveTo {
return "Event has already been moved by someone else."; return "Event has already been moved by someone else.";
} }
my $OldStorage = $self->Storage(); my $OldStorage = $self->Storage(undef);
my ( $OldPath ) = ( $self->Path() =~ /^(.*)$/ ); # De-taint my ( $OldPath ) = ( $self->Path() =~ /^(.*)$/ ); # De-taint
$$self{Storage} = $NewStorage; $$self{Storage} = $NewStorage;
@ -535,6 +535,7 @@ sub MoveTo {
for my $file (@files) { for my $file (@files) {
next if $file =~ /^\./; next if $file =~ /^\./;
( $file ) = ( $file =~ /^(.*)$/ ); # De-taint ( $file ) = ( $file =~ /^(.*)$/ ); # De-taint
Debug("Moving file $file to $NewPath");
if ( ! File::Copy::copy( $file, $NewPath ) ) { if ( ! File::Copy::copy( $file, $NewPath ) ) {
$error .= "Copy failed: for $file to $NewPath: $!"; $error .= "Copy failed: for $file to $NewPath: $!";
last; last;