Skip to content
This repository was archived by the owner on Nov 23, 2022. It is now read-only.

Commit

Permalink
Do not check digest on mapped installs
Browse files Browse the repository at this point in the history
Change-Id: I2d57eba354e4ec88f418208183f53c12e8548fcb
  • Loading branch information
Dees-Troy committed Apr 9, 2019
1 parent 1ecb6df commit 1da568f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions twinstall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -353,9 +353,9 @@ int TWinstall_zip(const char* path, int* wipe_cache) {

gui_msg("check_for_digest=Checking for Digest file...");

if (!twrpDigestDriver::Check_File_Digest(Full_Filename)) {
LOGERR("Aborting zip install: Digest verification failed\n");
return INSTALL_CORRUPT;
if (*path != '@' && !twrpDigestDriver::Check_File_Digest(Full_Filename)) {
LOGERR("Aborting zip install: Digest verification failed\n");
return INSTALL_CORRUPT;
}
}

Expand Down
2 changes: 1 addition & 1 deletion twrpDigestDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ bool twrpDigestDriver::Check_File_Digest(const string& Filename) {

if (!TWFunc::Path_Exists(digestfile)) {
delete digest;
if (Filename.find(".zip") == std::string::npos) {
if (Filename.find(".zip") == std::string::npos && Filename.find(".map") == std::string::npos) {
gui_msg(Msg(msg::kError, "no_digest_found=No digest file found for '{1}'. Please unselect Enable Digest verification to restore.")(Filename));
} else {
return true;
Expand Down

0 comments on commit 1da568f

Please sign in to comment.