mirror of
https://github.com/denoland/deno.git
synced 2024-11-29 16:30:56 -05:00
fix(ext/fs): add more context_path (#19101)
This commit is contained in:
parent
28a72d5488
commit
e0f07ab8cd
1 changed files with 2 additions and 2 deletions
|
@ -1154,7 +1154,7 @@ where
|
||||||
permissions.check_read(&path, "Deno.readFileSync()")?;
|
permissions.check_read(&path, "Deno.readFileSync()")?;
|
||||||
|
|
||||||
let fs = state.borrow::<FileSystemRc>();
|
let fs = state.borrow::<FileSystemRc>();
|
||||||
let buf = fs.read_file_sync(&path).context("readfile")?;
|
let buf = fs.read_file_sync(&path).context_path("readfile", &path)?;
|
||||||
|
|
||||||
Ok(buf.into())
|
Ok(buf.into())
|
||||||
}
|
}
|
||||||
|
@ -1210,7 +1210,7 @@ where
|
||||||
permissions.check_read(&path, "Deno.readFileSync()")?;
|
permissions.check_read(&path, "Deno.readFileSync()")?;
|
||||||
|
|
||||||
let fs = state.borrow::<FileSystemRc>();
|
let fs = state.borrow::<FileSystemRc>();
|
||||||
let buf = fs.read_file_sync(&path).context("readfile")?;
|
let buf = fs.read_file_sync(&path).context_path("readfile", &path)?;
|
||||||
|
|
||||||
Ok(string_from_utf8_lossy(buf))
|
Ok(string_from_utf8_lossy(buf))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue