diff --git a/ChangeLog b/ChangeLog index 827d53eda..33414d295 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-12-05 Chris Taylor + + * include/physfsx.h: getRealPath uses the write directory if it + can't get the real directory + 2004-12-03 Bradley Bell * include/cfile.h, include/physfsx.h: use PATH_MAX for hog diff --git a/include/physfsx.h b/include/physfsx.h index e3cd98d28..09f40065d 100644 --- a/include/physfsx.h +++ b/include/physfsx.h @@ -1,4 +1,4 @@ -/* $Id: physfsx.h,v 1.6 2004-12-04 04:07:16 btb Exp $ */ +/* $Id: physfsx.h,v 1.7 2004-12-05 10:56:32 btb Exp $ */ /* * @@ -83,7 +83,11 @@ static inline int PHYSFSX_getRealPath(const char *stdPath, char *realPath) char *p; if (!realDir) - return 0; + { + realDir = PHYSFS_getWriteDir(); + if (!realDir) + return 0; + } strncpy(realPath, realDir, PATH_MAX - 1); if (strlen(realPath) >= strlen(sep))