mikros: Close files on drop

This commit is contained in:
pjht 2024-06-18 16:44:55 -05:00
parent 6dba227540
commit 5f82526318
Signed by: pjht
GPG Key ID: 7B5F6AFBEC7EE78E

View File

@ -375,6 +375,19 @@ pub fn set_times(&self, _times: FileTimes) -> io::Result<()> {
}
}
impl Drop for File {
fn drop(&mut self) {
let _ = &rpc::send_call(
self.fs_pid,
1,
2,
&postcard::to_allocvec(&self.fd)
.unwrap(),
)
.get_return();
}
}
impl DirBuilder {
pub fn new() -> DirBuilder {
DirBuilder {}