[Bug 1767] Inconsistend wildcard expansion in 'ls *'

bugzilla-daemon at bugzilla.mindrot.org bugzilla-daemon at bugzilla.mindrot.org
Fri Jun 18 14:53:17 EST 2010


https://bugzilla.mindrot.org/show_bug.cgi?id=1767

Damien Miller <djm at mindrot.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |djm at mindrot.org

--- Comment #1 from Damien Miller <djm at mindrot.org>  ---
This is the special case code:

   755  /*
   756   * If the glob returns a single match and it is a directory,
   757   * then just list its contents.
   758   */
   759   if (g.gl_matchc == 1) {
   760       if ((a = do_lstat(conn, g.gl_pathv[0], 1)) == NULL) {
   761           globfree(&g);
   762           return (-1);
   763       }
   764       if ((a->flags & SSH2_FILEXFER_ATTR_PERMISSIONS) &&
   765           S_ISDIR(a->perm)) {
   766                int err;
   767  
   768                err = do_ls_dir(conn, g.gl_pathv[0], strip_path,
 lflag);
   769                globfree(&g);
   770                return (err);
   771       }
   772   }

Arguably, the special case behaviour is more consistent with a normal
shell when executing "ls *"

-- 
Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.


More information about the openssh-bugs mailing list