diff options
author | 2016-03-19 00:22:26 +1100 | |
---|---|---|
committer | 2016-03-19 00:23:09 +1100 | |
commit | b989ad92805cc2ecb0ab2a154393e0f044315ef2 (patch) | |
tree | 9583a52628da7d53a4c415f7be57e57c47f00b17 /src/tools/romcmp.cpp | |
parent | 45f20a43c76dd2b8a1379a8586e73ed61c70146f (diff) |
7zip romcmp
Diffstat (limited to 'src/tools/romcmp.cpp')
-rw-r--r-- | src/tools/romcmp.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/tools/romcmp.cpp b/src/tools/romcmp.cpp index a940d4522af..641667b6342 100644 --- a/src/tools/romcmp.cpp +++ b/src/tools/romcmp.cpp @@ -491,11 +491,10 @@ static int load_files(int i, int *found, const char *path) else { util::archive_file::ptr zip; - util::archive_file::error ziperr; /* wasn't a directory, so try to open it as a zip file */ - ziperr = util::archive_file::open_zip(path, zip); - if (ziperr != util::archive_file::error::NONE) + if ((util::archive_file::open_zip(path, zip) != util::archive_file::error::NONE) && + (util::archive_file::open_7z(path, zip) != util::archive_file::error::NONE)) { printf("Error, cannot open zip file '%s' !\n", path); return 1; @@ -504,6 +503,8 @@ static int load_files(int i, int *found, const char *path) /* load all files in zip file */ for (int zipent = zip->first_file(); zipent >= 0; zipent = zip->next_file()) { + if (zip->current_is_directory()) continue; + int size; size = zip->current_uncompressed_length(); |