[Toybox] [PATCH 1/2] tar: don't recurse into excluded directories

Rob Landley rob at landley.net
Tue Jun 9 07:56:04 PDT 2020


I applied this locally, but what's a test case?

  $ mkdir -p boing/subb/ping
  $ tar cvf boing.tar boing --exclude sub
  boing/
  boing/subb/
  boing/subb/ping/
  $ tar tvf boing.tar
  drwxr-xr-x landley/landley   0 2020-06-09 09:50 boing/
  drwxr-xr-x landley/landley   0 2020-06-09 09:50 boing/subb/
  drwxr-xr-x landley/landley   0 2020-06-09 09:50 boing/subb/ping/
  $ tar cvf boing.tar boing --exclude subb
  boing/
  boing/subb/
  boing/subb/ping/

That's the host tar? Exact match on the name of the subdir...

(I really don't use --exclude much. I vaguely recall working out what it meant
when I implemented it, but I appear to be misremembering. I just confirmed file
vs dir doesn't make a difference here...)

Rob



More information about the Toybox mailing list