Use strerror when file transfer can't be opened

This commit is contained in:
Sally Coolatta committed 2022-12-19 09:02:39 -05:00
1 parent fcddbdeaa1
commit 533dc7d668
1 file changed
+4 -2
+4 -2
View File
@@ -852,8 +852,10 @@ void SV_FileSendTicker(void)
fopen(f->id.filename, "rb");
if (!transfer[i].currentfile)
I_Error("File %s does not exist",
f->id.filename);
{
I_Error("Can't open file %s: %s",
f->id.filename, strerror(errno));
}
fseek(transfer[i].currentfile, 0, SEEK_END);
filesize = ftell(transfer[i].currentfile);