Fixed enumerations that end with '/'.

This commit is contained in:
Ryan C. Gordon 2002-07-23 17:52:56 +00:00
parent f47fafe523
commit 4765a364fe
1 changed files with 3 additions and 0 deletions

View File

@ -1258,6 +1258,9 @@ static LinkedStringList *ZIP_enumerateFiles(DirHandle *h,
LinkedStringList *retval = NULL, *p = NULL;
PHYSFS_uint32 dlen = strlen(dirname);
if (dirname[dlen - 1] == '/')
dlen--;
i = zip_find_start_of_dir(info, dirname, 0);
BAIL_IF_MACRO(i == -1, ERR_NO_SUCH_FILE, NULL);