r889 - trunk

DONOTREPLY at icculus.org DONOTREPLY at icculus.org
Sun Apr 1 18:06:37 EDT 2007


Author: icculus
Date: 2007-04-01 18:06:37 -0400 (Sun, 01 Apr 2007)
New Revision: 889

Modified:
   trunk/CHANGELOG.txt
   trunk/makeos2.cmd
   trunk/physfs.c
   trunk/physfs.h
Log:
Added PHYSFS_symbolicLinksPermitted().


Modified: trunk/CHANGELOG.txt
===================================================================
--- trunk/CHANGELOG.txt	2007-04-01 21:24:19 UTC (rev 888)
+++ trunk/CHANGELOG.txt	2007-04-01 22:06:37 UTC (rev 889)
@@ -2,7 +2,7 @@
  * CHANGELOG.
  */
 
-04012007 - Added PHYSFS_isInit() function.
+04012007 - Added PHYSFS_isInit() and PHYSFS_symbolicLinksPermitted() functions.
 03312007 - Added a quick'n'dirty unpack utility to the extras directory. Moved
            DIR archiver to start of the list, so we don't have to have every
            other archiver fail to open a directory as a file before mounting

Modified: trunk/makeos2.cmd
===================================================================
--- trunk/makeos2.cmd	2007-04-01 21:24:19 UTC (rev 888)
+++ trunk/makeos2.cmd	2007-04-01 22:06:37 UTC (rev 889)
@@ -42,6 +42,7 @@
 @echo "_PHYSFS_getLastError" >> bin\physfs.def
 @echo "_PHYSFS_getDirSeparator" >> bin\physfs.def
 @echo "_PHYSFS_permitSymbolicLinks" >> bin\physfs.def
+ at echo "_PHYSFS_symbolicLinksPermitted" >> bin\physfs.def
 @echo "_PHYSFS_getCdRomDirs" >> bin\physfs.def
 @echo "_PHYSFS_getBaseDir" >> bin\physfs.def
 @echo "_PHYSFS_getUserDir" >> bin\physfs.def

Modified: trunk/physfs.c
===================================================================
--- trunk/physfs.c	2007-04-01 21:24:19 UTC (rev 888)
+++ trunk/physfs.c	2007-04-01 22:06:37 UTC (rev 889)
@@ -1173,6 +1173,12 @@
 } /* PHYSFS_permitSymbolicLinks */
 
 
+int PHYSFS_symbolicLinksPermitted(void)
+{
+    return(allowSymLinks);
+} /* PHYSFS_symbolicLinksPermitted */
+
+
 /* string manipulation in C makes my ass itch. */
 char *__PHYSFS_convertToDependent(const char *prepend,
                                   const char *dirName,

Modified: trunk/physfs.h
===================================================================
--- trunk/physfs.h	2007-04-01 21:24:19 UTC (rev 888)
+++ trunk/physfs.h	2007-04-01 22:06:37 UTC (rev 889)
@@ -622,6 +622,8 @@
  *  you've called PHYSFS_init(), and is disabled by default.
  *
  *   \param allow nonzero to permit symlinks, zero to deny linking.
+ *
+ * \sa PHYSFS_symbolicLinksPermitted
  */
 __EXPORT__ void PHYSFS_permitSymbolicLinks(int allow);
 
@@ -1931,6 +1933,21 @@
 
 
 /**
+ * \fn int PHYSFS_symbolicLinksPermitted(void)
+ * \brief Determine if the symbolic links are permitted.
+ *
+ * This reports the setting from the last call to PHYSFS_permitSymbolicLinks().
+ *  If PHYSFS_permitSymbolicLinks() hasn't been called since the library was
+ *  last initialized, symbolic links are implicitly disabled.
+ *
+ *  \return non-zero if symlinks are permitted, zero if not.
+ *
+ * \sa PHYSFS_permitSymbolicLinks
+ */
+__EXPORT__ int PHYSFS_symbolicLinksPermitted(void);
+
+
+/**
  * \struct PHYSFS_Allocator
  * \brief PhysicsFS allocation function pointers.
  *




More information about the physfs-commits mailing list