[physfs] What to do if PHYSFS_close fails?

Sik the hedgehog sik.the.hedgehog at gmail.com
Fri Jun 7 22:02:10 EDT 2013

Question: PHYSFS_close can return an error code if it fails to close
the file. What am I supposed to do in that case? If I can't close a
file chances are I'm pretty much stuck with it and can't do anything
else. I can't let the program hang for something like that. I know
it's extremely unlikely to happen, but the return value is there for a
reason. Currently I'm just ignoring it but I'm 100% sure that's wrong.

For the sake of comparison: fclose can also return an error code, but
the file is always guaranteed to close. The error code just says if
the file closed without any issues (e.g. corruption or flushing failed
or something).

More information about the physfs mailing list