Skip to content

Commit

Permalink
Fix comments
Browse files Browse the repository at this point in the history
  • Loading branch information
pvdrz committed Sep 24, 2019
1 parent 0f58289 commit 02261e4
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,15 +120,14 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
let this = self.eval_context_mut();

if !this.machine.communicate {
throw_unsup_format!("Function not available when isolation is enabled")
throw_unsup_format!("`getcwd` not available when isolation is enabled")
}

let tcx = &{ this.tcx.tcx };

let buf = this.force_ptr(this.read_scalar(buf_op)?.not_undef()?)?;
let size = this.read_scalar(size_op)?.to_usize(&*this.tcx)?;
// If we cannot get the current directory, we return null
// FIXME: Technically we have to set the `errno` global too
match env::current_dir() {
Ok(cwd) => {
// It is not clear what happens with non-utf8 paths here
Expand Down

0 comments on commit 02261e4

Please sign in to comment.