Sophie

Sophie

distrib > Arklinux > devel > x86_64 > by-pkgid > df60bbc9423b65b4ca1c486677d56999 > files > 1

physfs-2.0.1-1ark.src.rpm

--- physfs-2.0.1/platform/unix.c.ark	2010-06-01 16:25:12.527448758 +0200
+++ physfs-2.0.1/platform/unix.c	2010-06-01 16:27:10.797854070 +0200
@@ -274,6 +274,10 @@ char *__PHYSFS_platformCalcBaseDir(const
             retval = ptr;  /* oh well if it failed. */
     } /* if */
 
+    /* If we're installed in a system directory (e.g. /usr/bin), chop off /bin */
+    if(!strcmp(retval+strlen(retval)-4, "/bin"))
+	    *strrchr(retval, '/') = 0;
+
     return(retval);
 } /* __PHYSFS_platformCalcBaseDir */