Currently, the file is fopen()'d to read/use its metadata to mark it for deletion. Rewrite it so it operates directly on the directory entries. This will also mean a check has to be added to make sure the file being deleted isn't the currently open file.
Currently, the file is
fopen()
'd to read/use its metadata to mark it for deletion. Rewrite it so it operates directly on the directory entries. This will also mean a check has to be added to make sure the file being deleted isn't the currently open file.