Try the DIR archiver first, since there's no sense in trying to open a
authorRyan C. Gordon <icculus@icculus.org>
Sat, 31 Mar 2007 06:52:27 +0000
changeset 869 1c0138d6ce45
parent 868 87ea5fcab4e9
child 871 7d9a26213980
Try the DIR archiver first, since there's no sense in trying to open a directory as a file in all the other archivers first.
CHANGELOG.txt
physfs.c
--- a/CHANGELOG.txt	Sat Mar 31 06:34:51 2007 +0000
+++ b/CHANGELOG.txt	Sat Mar 31 06:52:27 2007 +0000
@@ -2,7 +2,10 @@
  * CHANGELOG.
  */
 
-03312007 - Added a quick'n'dirty unpack utility to the extras directory.
+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
+           it.
 03282007 - Logic bug in MVL/HOG/GRP archivers: only enumerated files when
            looking in a directory other than the root, instead of enumerating
            only for the root (thanks, Chris!). Minor fix for compilers that
--- a/physfs.c	Sat Mar 31 06:34:51 2007 +0000
+++ b/physfs.c	Sat Mar 31 06:52:27 2007 +0000
@@ -96,6 +96,7 @@
 
 static const PHYSFS_Archiver *archivers[] =
 {
+    &__PHYSFS_Archiver_DIR,
 #if (defined PHYSFS_SUPPORTS_ZIP)
     &__PHYSFS_Archiver_ZIP,
 #endif
@@ -117,7 +118,6 @@
 #if (defined PHYSFS_SUPPORTS_WAD)
     &__PHYSFS_Archiver_WAD,
 #endif
-    &__PHYSFS_Archiver_DIR,
     NULL
 };