Handle the case where we continue after locking a nonexistent file
The previous version of this would lead to big warnings and impossibles. This doesn't seem like a useful case, but it's still better to have better warning messages just in case it does happen.
This commit is contained in:
@@ -1675,6 +1675,7 @@ int retryct;
|
|||||||
if (lockfd == -1) {
|
if (lockfd == -1) {
|
||||||
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
|
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
|
||||||
filename);
|
filename);
|
||||||
|
nesting--;
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
sflock.l_type = F_WRLCK;
|
sflock.l_type = F_WRLCK;
|
||||||
|
|||||||
Reference in New Issue
Block a user