This repository was archived by the owner on Sep 3, 2025. It is now read-only.
Commit 5530ec2
committed
filesystem: handle missing dir in 'ReadDirRecursive()'
If 'ReadDirRecursive()' receives a non-existent root path, the initial
'os.ReadDir()' throws a ENOENT error. Handle this case more gracefully
(i.e., without error) by returning an empty entry list with no error if the
we should exit gracefully if the error from 'os.ReadDir()' is
'os.ErrNotExist' (corresponding to ENOENT).
Signed-off-by: Victoria Dye <vdye@github.com>1 parent 05fe98e commit 5530ec2
1 file changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
218 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
219 | 225 | | |
220 | 226 | | |
221 | 227 | | |
| |||
0 commit comments