Fix archive info to not fail if empty icon exists 39/240539/1
authorJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 7 Aug 2020 07:44:36 +0000 (16:44 +0900)
committerJunghyun Yeon <jungh.yeon@samsung.com>
Fri, 7 Aug 2020 07:44:36 +0000 (16:44 +0900)
Change-Id: I6f69c2f10267ddf4a1418b29da93d5024cb236cb
Signed-off-by: Junghyun Yeon <jungh.yeon@samsung.com>
src/lib/wgt_archive_info.cc

index df7efc2..7552812 100644 (file)
@@ -134,7 +134,7 @@ bool WgtArchiveInfo::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));