No exception when closing a file more than once

This commit is contained in:
rfm 2024-06-10 11:51:47 +01:00
parent 3202bd00f7
commit 67c53d6598
2 changed files with 7 additions and 2 deletions

View file

@ -1,3 +1,8 @@
2024-06-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSFileHandle.m: debug log of closing a closed file handle
rather than raising exception (reported by Wolfgang).
2024-05-31 Hugo Melder <hugo@algoriddim.com>
* Source/NSPredicate.m:

View file

@ -1620,8 +1620,8 @@ NSString * const GSSOCKSRecvAddr = @"GSSOCKSRecvAddr";
{
if (descriptor < 0)
{
[NSException raise: NSFileHandleOperationException
format: @"attempt to close closed file"];
NSDebugMLLog(@"NSFileHandle", @"close of closed file %@", self);
return;
}
[self ignoreReadDescriptor];
[self ignoreWriteDescriptor];