Use more starts_with/ends_with.

Remove ends_with global func.
This commit is contained in:
Nekotekina 2020-02-18 00:43:23 +03:00
parent 90f4023cb8
commit f08c778d2c
11 changed files with 24 additions and 30 deletions

View file

@ -113,7 +113,7 @@ bool pkg_install(const std::string& path, atomic_t<double>& sync)
if (header.pkg_size > filelist[0].size())
{
// Check if multi-files pkg
if (path.size() < 7 || path.compare(path.size() - 7, 7, "_00.pkg", 7) != 0)
if (!path.ends_with("_00.pkg"))
{
pkg_log.error("PKG file size mismatch (pkg_size=0x%llx)", header.pkg_size);
return false;