Patch for PhysFS

David Hedbor david at hedbor.org
Fri Sep 14 16:24:52 EDT 2001


The attached patch makes PhysFS handle the case when the current
directory (as returned by getcwd()) has been deleted.
Fix 1, platform/unix.c:
  Only retry getcwd if the error is ERANGE. Before it retried till the
  malloc failed in the case of the directory not existing.
Fix 2: physfs.c:
  If __PHYSFS_platformCurrentDir() return's NULL, use the root as the
  base dir. Bad solution but the best I can think of (alternative :
  use /tmp or Windows TEMP dir?).

-- 
[ Below is a random fortune, which is unrelated to the above message. ]
Entreprenuer, n.:
	A high-rolling risk taker who would rather
	be a spectacular failure than a dismal success.
f
-------------- next part --------------
A non-text attachment was scrubbed...
Name: physfs-nocwdfix.diff
Type: text/x-patch
Size: 1690 bytes
Desc: not available
URL: <http://icculus.org/pipermail/physfs/attachments/20010914/bab1f0a1/attachment.bin>


More information about the physfs mailing list