This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-vfs.git


The following commit(s) were added to refs/heads/master by this push:
     new 08b5de7  [VFS-753] NumberFormatException in SftpFileSystem::getUId.
08b5de7 is described below

commit 08b5de760579f7f27d5757958588029ba439f42c
Author: Gary Gregory <garydgreg...@gmail.com>
AuthorDate: Wed Feb 5 17:51:40 2020 -0500

    [VFS-753] NumberFormatException in SftpFileSystem::getUId.
    
    A slightly better error check.
---
 .../java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java     | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
index ae64f4d..104ebc8 100644
--- 
a/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
+++ 
b/commons-vfs2/src/main/java/org/apache/commons/vfs2/provider/sftp/SftpFileSystem.java
@@ -346,8 +346,7 @@ public class SftpFileSystem extends AbstractFileSystem {
      */
     private boolean detectExecDisabled() {
         try {
-            getUId();
-            return false;
+            return getUId() == UNIDENTIFED;
         } catch(JSchException | IOException e) {
             LOG.debug("Cannot get UID, assuming no exec channel is present", 
e);
             return true;

Reply via email to