diff --git a/jaq/src/main.rs b/jaq/src/main.rs index 865694d69..b702de433 100644 --- a/jaq/src/main.rs +++ b/jaq/src/main.rs @@ -107,6 +107,7 @@ fn real_main(cli: &Cli) -> Result { })?; // replace the input file with the temporary file + std::mem::drop(file); let perms = std::fs::metadata(path)?.permissions(); tmp.persist(path).map_err(Error::Persist)?; std::fs::set_permissions(path, perms)?;