Commit 3124758
Refuse Anything That Is Not a File or a Directory, Not Merely What Is Absent
Testing for existence covered a typo and nothing else. A FIFO, a socket,
and a device all exist and are neither a file nor a directory, and
`discover` reads each of them as `.`, so the run still scanned the caller's
directory while the rule set anchored on the argument's parent. The
invariant held for the case I pictured and not for its siblings.
The check now asks what the path is rather than whether it is there, which
covers both.
Two cases: the missing path, and a real FIFO created in the test, skipped
where `os.mkfifo` is unavailable.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent 8756f3a commit 3124758
2 files changed
Lines changed: 23 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1119 | 1119 | | |
1120 | 1120 | | |
1121 | 1121 | | |
1122 | | - | |
1123 | | - | |
1124 | | - | |
1125 | | - | |
| 1122 | + | |
| 1123 | + | |
| 1124 | + | |
| 1125 | + | |
| 1126 | + | |
1126 | 1127 | | |
1127 | | - | |
1128 | | - | |
1129 | | - | |
| 1128 | + | |
| 1129 | + | |
| 1130 | + | |
1130 | 1131 | | |
1131 | 1132 | | |
1132 | 1133 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
17 | 18 | | |
| |||
1866 | 1867 | | |
1867 | 1868 | | |
1868 | 1869 | | |
1869 | | - | |
| 1870 | + | |
| 1871 | + | |
| 1872 | + | |
| 1873 | + | |
| 1874 | + | |
| 1875 | + | |
| 1876 | + | |
| 1877 | + | |
| 1878 | + | |
| 1879 | + | |
| 1880 | + | |
| 1881 | + | |
| 1882 | + | |
| 1883 | + | |
1870 | 1884 | | |
1871 | 1885 | | |
1872 | 1886 | | |
| |||
0 commit comments