Move forwarded files rather than copying them.

This commit is contained in:
4lDO2
2023-05-28 12:05:19 +02:00
parent b1d4f55e0a
commit ce77703146
+1 -1
View File
@@ -270,7 +270,7 @@ impl UserInner {
SKMSG_FRETURNFD => {
let fd = packet.c;
let desc = context::current()?.read().get_file(FileHandle::from(fd)).ok_or(Error::new(EINVAL))?.description;
let desc = context::current()?.read().remove_file(FileHandle::from(fd)).ok_or(Error::new(EINVAL))?.description;
self.done.send(packet.id, Response::Fd(desc));
}