Hi, 

I think I found a problem in 

  private boolean isPattern(byte[] path){
    int i=path.length-1;
    while(i>=0){
      if(path[i]=='*' || path[i]=='?'){
        if(i>0 && path[i-1]=='\\'){
          i--;
          if(i>0 && path[i-1]=='\\'){    // \\* or \\?
            break;
          }
        }
        else{
          break;
        }
      }
      i--;
    }
    // System.err.println("isPattern: ["+(new String(path))+"] "+(!(i<0)));
    return !(i<0);
  }

The method returns true for 

  foo\\\*bar

which is not a pattern I think. I'm not sure if this acutally causes wrong 
behavior, but it does cause unnecessary globbing on the server.

Regards,

Michael
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
JSch-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jsch-users

Reply via email to