From 60dfcae88b36ffb75197ef97b66d962a4c528615 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Sat, 31 Mar 2007 06:52:27 +0000 Subject: [PATCH] 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 | 5 ++++- physfs.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.txt b/CHANGELOG.txt index 825f9f70..7f0ee380 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -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 diff --git a/physfs.c b/physfs.c index 8bc929fb..c3cc0275 100644 --- a/physfs.c +++ b/physfs.c @@ -96,6 +96,7 @@ static const PHYSFS_ArchiveInfo *supported_types[] = static const PHYSFS_Archiver *archivers[] = { + &__PHYSFS_Archiver_DIR, #if (defined PHYSFS_SUPPORTS_ZIP) &__PHYSFS_Archiver_ZIP, #endif @@ -117,7 +118,6 @@ static const PHYSFS_Archiver *archivers[] = #if (defined PHYSFS_SUPPORTS_WAD) &__PHYSFS_Archiver_WAD, #endif - &__PHYSFS_Archiver_DIR, NULL };