Change archive info behavior 38/240538/2
authorJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 7 Aug 2020 07:35:13 +0000 (16:35 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 7 Aug 2020 08:07:54 +0000 (08:07 +0000)
Change archive info to not fail if there are icon file exists but empty

Change-Id: I78c61371e1fca569ed7a1e9e33ad26670986cee6
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/lib/tpk_archive_info.cc

index eae8c9a..0ad3128 100644 (file)
@@ -216,7 +216,7 @@ bool TpkArchiveInfo::ReadIcon(const bf::path& icon, const bf::path& tmp_dir) {
   std::streamoff len = ifs.tellg();
   ifs.seekg(0, ifs.beg);
 
-  if (len <= 0)
+  if (len < 0)
     return false;
 
   icon_buf_.resize(len / sizeof(unsigned char));