Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: skip non-UTF-8 dir entries in Deno.readDir() (denoland#4004)
Example: $ python2 -c 'open("\x80\x7F", "w")' $ deno eval 'Deno.readDirSync(".")' thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', cli/ops/fs.rs:373:16 note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace fatal runtime error: failed to initiate panic, error 5 Aborted (core dumped) Before this commit they made deno panic, now they are silently skipped. Not ideal but arguably better than panicking. No test because what characters are and aren't allowed in filenames is highly file system-dependent. Closes denoland#3950
- Loading branch information