don't move event if there are no files. Add some more debug
parent
29140a3012
commit
095f4614da
|
@ -630,6 +630,10 @@ Debug("Files to move @files");
|
|||
return $error;
|
||||
}
|
||||
my @files = glob("$OldPath/*");
|
||||
if ( ! @files ) {
|
||||
$ZoneMinder::Database::dbh->commit();
|
||||
return "No files to move.";
|
||||
}
|
||||
|
||||
for my $file (@files) {
|
||||
next if $file =~ /^\./;
|
||||
|
@ -659,8 +663,10 @@ Debug("Files to move @files");
|
|||
$ZoneMinder::Database::dbh->commit();
|
||||
return $error;
|
||||
}
|
||||
Debug("Committing");
|
||||
$ZoneMinder::Database::dbh->commit();
|
||||
$self->delete_files( $OldStorage );
|
||||
Debug("Done deleting files, returning");
|
||||
return $error;
|
||||
} # end sub MoveTo
|
||||
|
||||
|
|
Loading…
Reference in New Issue