diff options
| author | Casper Beyer <caspervonb@pm.me> | 2020-06-28 03:55:05 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-06-27 15:55:05 -0400 |
| commit | 5f3d730df0a249357a0d9112b9ee25f16bf7b8d4 (patch) | |
| tree | e34b5216f9be04c535eef963f3841e2d42274c2c /std/wasi/snapshot_preview1.ts | |
| parent | 40dcfc89969b6492a616d816c67ffdc081132d15 (diff) | |
fix(std/wasi): use lookupflags for path_filestat_get (#6530)
Diffstat (limited to 'std/wasi/snapshot_preview1.ts')
| -rw-r--r-- | std/wasi/snapshot_preview1.ts | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/std/wasi/snapshot_preview1.ts b/std/wasi/snapshot_preview1.ts index e04222240..0067499cc 100644 --- a/std/wasi/snapshot_preview1.ts +++ b/std/wasi/snapshot_preview1.ts @@ -853,7 +853,10 @@ export default class Module { const view = new DataView(this.memory.buffer); try { - const info = Deno.statSync(path); + const info = + (flags & LOOKUPFLAGS_SYMLINK_FOLLOW) != 0 + ? Deno.statSync(path) + : Deno.lstatSync(path); view.setBigUint64(buf_out, BigInt(info.dev ? info.dev : 0), true); buf_out += 8; |
