Implemented flag FILE_FLAG_DELETE_ON_CLOSE.
This commit is contained in:
parent
9896a36168
commit
cddfcce5f3
|
@ -314,6 +314,7 @@ static void file_destroy( struct object *obj )
|
||||||
while (*pptr && *pptr != file) pptr = &(*pptr)->next;
|
while (*pptr && *pptr != file) pptr = &(*pptr)->next;
|
||||||
assert( *pptr );
|
assert( *pptr );
|
||||||
*pptr = (*pptr)->next;
|
*pptr = (*pptr)->next;
|
||||||
|
if (file->flags & FILE_FLAG_DELETE_ON_CLOSE) unlink( file->name );
|
||||||
free( file->name );
|
free( file->name );
|
||||||
}
|
}
|
||||||
close( file->fd );
|
close( file->fd );
|
||||||
|
|
Loading…
Reference in New Issue