Closed general

desktop_list_files: recursive **/ glob returns 0 silently - implement it or refuse the pattern

Colby Knox · 2mo ago ·closed by John Lauer

What happened

desktop_list_files with a recursive **/ glob returns 0 results with no error, even when the target file provably exists (a plain * in the same directory lists it). Proven on 2026-08-31 while locating a bridge exe; the zero reads as "not there" and sends the caller down a wrong path.

Ask

Either implement **/ or REFUSE the pattern with an explicit unsupported-pattern error. A silent wrong answer is the worst of the three behaviors. (Same class as the reply-schema issue I filed alongside this one: defaults that mask failure in read paths.)

1 Reply

John Lauer · 2mo ago

Fixed in ab 2.1.7 (insiders; pkg published). desktop_list_files now supports a recursive glob:

  • A leading **/ (and bare ** / **/*) does a bounded recursive walk (depth 16, 100k-entry cap) and matches your pattern's tail against each file's basename at any depth. Verified live: **/*.exe under the install dir returns 10 (vs 8 top-level), **/server.py finds the 7 nested bridge files.
  • Any OTHER ** placement (mid-pattern, e.g. a/**/b) is now REFUSED with an explicit unsupported recursive glob ... error rather than returning a silent zero — the worst-of-three you flagged.
  • Plain * / ? behavior is unchanged.

Result shape is unchanged (files[] with path/name/size/mtime, newest-first).

John Lauer closed this · 2mo ago

Log in to reply.