From 1e1194a669bd99608bed8169430277efe94db3e8 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Mon, 27 Feb 2017 01:53:51 +0100 Subject: [PATCH] - fixed: Dp mot strip the top level folder name in Zips if they only contain one entry or if the first entry isn't a directory. --- src/resourcefiles/file_zip.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/resourcefiles/file_zip.cpp b/src/resourcefiles/file_zip.cpp index 18f690205..bd2990dec 100644 --- a/src/resourcefiles/file_zip.cpp +++ b/src/resourcefiles/file_zip.cpp @@ -220,7 +220,7 @@ bool FZipFile::Open(bool quiet) // Check if all files have the same prefix so that this can be stripped out. FString name0; - for (DWORD i = 0; i < NumLumps; i++) + if (NumLumps > 1) for (DWORD i = 0; i < NumLumps; i++) { FZipCentralDirectoryInfo *zip_fh = (FZipCentralDirectoryInfo *)dirptr; @@ -244,6 +244,7 @@ bool FZipFile::Open(bool quiet) { // check for special names, if one of these gets found this must be treated as a normal zip. bool isspecial = !name.Compare("flats/") || + name.IndexOf("/") < 0 || !name.Compare("textures/") || !name.Compare("hires/") || !name.Compare("sprites/") ||