From 10d747567ef9023078efbef1798e7a814befcfb5 Mon Sep 17 00:00:00 2001 From: steadfasterX Date: Fri, 6 Jul 2018 15:40:39 +0200 Subject: enable md5sum digest verification all (well I just checked LOS, aoscp and aicp) ROM scripts use "md5sum" as extension but TWRP checks only for the extension "md5". This change will also expects md5sum as the default digest extension and only if not found falling back to md5. Change-Id: Ia1dd072d77d53ed6c6ff13c6db730abdcdb56bb3 --- twinstall.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'twinstall.cpp') diff --git a/twinstall.cpp b/twinstall.cpp index 7351e6326..d63088cb9 100644 --- a/twinstall.cpp +++ b/twinstall.cpp @@ -327,7 +327,14 @@ int TWinstall_zip(const char* path, int* wipe_cache) { string digest_str; string Full_Filename = path; string digest_file = path; - digest_file += ".md5"; + string defmd5file = digest_file + ".md5sum"; + + if (TWFunc::Path_Exists(defmd5file)) { + digest_file += ".md5sum"; + } + else { + digest_file += ".md5"; + } gui_msg("check_for_digest=Checking for Digest file..."); if (!TWFunc::Path_Exists(digest_file)) { -- cgit v1.2.3