Ilseq is the correct error when osstring cant be turned into string

This commit is contained in:
Pat Hickey
2021-01-04 16:04:00 -08:00
parent c7fcc34487
commit 10a84727fa
2 changed files with 2 additions and 5 deletions

View File

@@ -744,7 +744,7 @@ impl<'a> wasi_snapshot_preview1::WasiSnapshotPreview1 for WasiCtx {
.read_link(path.deref())?
.into_os_string()
.into_string()
.map_err(|_| Error::Utf8(todo!()))?;
.map_err(|_| Error::Ilseq)?;
let link_bytes = link.as_bytes();
let link_len = link_bytes.len();
if link_len > buf_len as usize {