diff options
author | dubiousjim <dubiousjim@gmail.com> | 2020-04-03 13:45:44 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-04-03 13:45:44 -0400 |
commit | c5c3abc517a1729c2fcc0977bb1e792e06b7eb3c (patch) | |
tree | f83eb27a7febfa0bfe20c09de488fb0f4b7688c8 /cli/ops/fs.rs | |
parent | c0cb198114ccc2dc4fa2764d307ad985c456882a (diff) |
adjust docs for Deno.seek (#4610)
Diffstat (limited to 'cli/ops/fs.rs')
-rw-r--r-- | cli/ops/fs.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cli/ops/fs.rs b/cli/ops/fs.rs index c076b2b24..43f3db614 100644 --- a/cli/ops/fs.rs +++ b/cli/ops/fs.rs @@ -226,12 +226,14 @@ fn op_seek( }; let mut file = futures::executor::block_on(tokio_file.try_clone())?; + let is_sync = args.promise_id.is_none(); let fut = async move { + debug!("op_seek {} {} {}", rid, offset, whence); let pos = file.seek(seek_from).await?; Ok(json!(pos)) }; - if args.promise_id.is_none() { + if is_sync { let buf = futures::executor::block_on(fut)?; Ok(JsonOp::Sync(buf)) } else { |