1
0
Fork 0
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:
David Sherret 2023-05-11 19:05:37 -04:00 committed by GitHub
parent 28a72d5488
commit e0f07ab8cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1154,7 +1154,7 @@ where
permissions.check_read(&path, "Deno.readFileSync()")?;
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())
}
@ -1210,7 +1210,7 @@ where
permissions.check_read(&path, "Deno.readFileSync()")?;
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))
}