--- a/src/archiver_qpak.c Thu Oct 06 03:24:53 2011 -0400
+++ b/src/archiver_qpak.c Tue Oct 18 15:55:29 2011 -0400
@@ -525,19 +525,22 @@
const QPAKinfo *info = (const QPAKinfo *) opaque;
const QPAKentry *entry = qpak_find_entry(info, filename, &isDir);
- *exists = ((isDir) || (entry != NULL));
- if (!exists)
- return 0;
-
if (isDir)
{
+ *exists = 1;
stat->filetype = PHYSFS_FILETYPE_DIRECTORY;
stat->filesize = 0;
} /* if */
+ else if (entry != NULL)
+ {
+ *exists = 1;
+ stat->filetype = PHYSFS_FILETYPE_REGULAR;
+ stat->filesize = entry->size;
+ } /* else if */
else
{
- stat->filetype = PHYSFS_FILETYPE_REGULAR;
- stat->filesize = entry->size;
+ *exists = 0;
+ return 0;
} /* else */
stat->modtime = -1;