Undo changes to ls_ftp in RemoteAccount.pm user/dyrcona/remoteaccount-ftp-log-message-patch
authorJason Stephenson <jason@sigio.com>
Tue, 9 Jul 2019 19:39:32 +0000 (15:39 -0400)
committerJason Stephenson <jason@sigio.com>
Tue, 9 Jul 2019 19:39:32 +0000 (15:39 -0400)
Rather than sort out the underlying bug, we remove all of the plaster
so that we're back to where we had a silent "failure."

Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/Utils/RemoteAccount.pm

index b40f0dd..16feb47 100644 (file)
@@ -646,11 +646,10 @@ sub ls_ftp {   # returns full path like: dir/path/file.ext
         my $dirtarget = $dirpath || $_;
         $dirtarget =~ s/\/+$//;
         eval { @part = $self->_ftp->ls($dirtarget) };      # this ls returns relative/path/filenames.  defer filename glob filtering for below.
-        if ($@ or !@part) {
+        if ($@) {
             $logger->error(
                 $self->_error(
-                    "ls from",  $self->remote_host, "failed with error: " . (defined($self->_ftp))
-                        ? $self->_ftp->message : $@
+                    "ls from",  $self->remote_host, "failed with error: $@"
                 )
             );
             next;