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:
Alex Smith
2017-09-01 18:49:43 +01:00
parent 49ddedc138
commit a2f886c665

View File

@@ -1675,6 +1675,7 @@ int retryct;
if (lockfd == -1) {
HUP raw_printf("Cannot open file %s. Is NetHack installed correctly?",
filename);
nesting--;
return FALSE;
}
sflock.l_type = F_WRLCK;