1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-21 23:04:45 -05:00
denoland-deno/cli/ops
Ben Noordhuis 503d8bfef2
fix: skip non-UTF-8 dir entries in Deno.readDir() (#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 #3950
2020-02-15 10:37:05 -05:00
..
compiler.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
dispatch_json.rs No longer require aligned buffer for shared queue (#3935) 2020-02-09 10:54:16 -08:00
dispatch_minimal.rs refactor: Use Tokio's single-threaded runtime (#3844) 2020-02-03 18:08:44 -05:00
errors.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
fetch.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
files.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
fs.rs fix: skip non-UTF-8 dir entries in Deno.readDir() (#4004) 2020-02-15 10:37:05 -05:00
io.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
mod.rs refactor: Use Tokio's single-threaded runtime (#3844) 2020-02-03 18:08:44 -05:00
net.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
os.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
permissions.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
plugins.rs refactor: replace Arc<Box<..>> with Rc<..> (#3996) 2020-02-15 01:18:36 +01:00
process.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
random.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
repl.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
resources.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
runtime.rs refactor: Remove atomics from metrics (#3968) 2020-02-11 17:23:40 +01:00
runtime_compiler.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
signal.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
timers.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
tls.rs refactor: rename ThreadSafeState, use RefCell for mutable state (#3931) 2020-02-08 20:34:31 +01:00
web_worker.rs workers: basic event loop (#3828) 2020-02-11 10:04:59 +01:00
worker_host.rs workers: basic event loop (#3828) 2020-02-11 10:04:59 +01:00