bool PackageManagerImpl::TryGetFileDigest(const PathName& prefix, const string& fileName, bool& haveDigest, MD5& digest) { string unprefixed; if (!StripTeXMFPrefix(fileName, unprefixed)) { return true; } PathName path = prefix; path /= unprefixed; if (!File::Exists(path)) { trace_mpm->WriteLine(TRACE_FACILITY, fmt::format(T_("package verification failed: file {0} does not exist"), Q_(path))); return false; } if (path.HasExtension(MIKTEX_PACKAGE_MANIFEST_FILE_SUFFIX)) { haveDigest = false; } else { digest = MD5::FromFile(path); haveDigest = true; } return true; }
bool IsZFileName (/*[in]*/ const PathName & fileName) { return (fileName.HasExtension(".gz") || fileName.HasExtension(".bz2")); }