From 21bf00463270e49796e98b26e750e46bb9733cb1 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Wed, 6 Mar 2013 19:05:59 +0100 Subject: [PATCH] Zip reader: logging fixes --- file/zip_read.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/file/zip_read.cpp b/file/zip_read.cpp index 70880f1032..cb01aa3191 100644 --- a/file/zip_read.cpp +++ b/file/zip_read.cpp @@ -54,7 +54,6 @@ uint8_t *ReadLocalFile(const char *filename, size_t *size) { #ifdef ANDROID ZipAssetReader::ZipAssetReader(const char *zip_file, const char *in_zip_path) { - ELOG("ZIP File %s", zip_file); zip_file_ = zip_open(zip_file, 0, NULL); strcpy(in_zip_path_, in_zip_path); if (!zip_file_) { @@ -140,15 +139,14 @@ bool ZipAssetReader::GetFileListing(const char *path, std::vector *lis return true; } -bool ZipAssetReader::GetFileInfo(const char *path, FileInfo *info) -{ +bool ZipAssetReader::GetFileInfo(const char *path, FileInfo *info) { struct zip_stat zstat; char temp_path[1024]; strcpy(temp_path, in_zip_path_); strcat(temp_path, path); - if (0 != zip_stat(zip_file_, temp_path, ZIP_FL_NOCASE, &zstat)) - { - ELOG("Failed doing zip_stat on %s, bailing", path); + if (0 != zip_stat(zip_file_, temp_path, ZIP_FL_NOCASE, &zstat)) { + // ZIP files do not have real directories, so we'll end up here if we + // try to stat one. For now that's fine. info->exists = false; info->size = 0; return false;