瀏覽代碼

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.

Ryan C. Gordon 19 年之前
父節點
當前提交
60dfcae88b
共有 2 個文件被更改,包括 5 次插入2 次删除
  1. 4 1
      CHANGELOG.txt
  2. 1 1
      physfs.c

+ 4 - 1
CHANGELOG.txt

@@ -2,7 +2,10 @@
  * CHANGELOG.
  * 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
 03282007 - Logic bug in MVL/HOG/GRP archivers: only enumerated files when
            looking in a directory other than the root, instead of enumerating
            looking in a directory other than the root, instead of enumerating
            only for the root (thanks, Chris!). Minor fix for compilers that
            only for the root (thanks, Chris!). Minor fix for compilers that

+ 1 - 1
physfs.c

@@ -96,6 +96,7 @@ static const PHYSFS_ArchiveInfo *supported_types[] =
 
 
 static const PHYSFS_Archiver *archivers[] =
 static const PHYSFS_Archiver *archivers[] =
 {
 {
+    &__PHYSFS_Archiver_DIR,
 #if (defined PHYSFS_SUPPORTS_ZIP)
 #if (defined PHYSFS_SUPPORTS_ZIP)
     &__PHYSFS_Archiver_ZIP,
     &__PHYSFS_Archiver_ZIP,
 #endif
 #endif
@@ -117,7 +118,6 @@ static const PHYSFS_Archiver *archivers[] =
 #if (defined PHYSFS_SUPPORTS_WAD)
 #if (defined PHYSFS_SUPPORTS_WAD)
     &__PHYSFS_Archiver_WAD,
     &__PHYSFS_Archiver_WAD,
 #endif
 #endif
-    &__PHYSFS_Archiver_DIR,
     NULL
     NULL
 };
 };