Modify the condition for checking if it is a directory
authordahyeong.kim <dahyeong.kim@samsung.com>
Sun, 16 Jun 2013 11:20:38 +0000 (20:20 +0900)
committerdahyeong.kim <dahyeong.kim@samsung.com>
Sun, 16 Jun 2013 11:25:39 +0000 (20:25 +0900)
Change-Id: I72539f7fb06185f24583fc205dcb6b73c3fafea5
Signed-off-by: dahyeong.kim <dahyeong.kim@samsung.com>
src/base/utility/FBaseUtil_FileUnzipperImpl.cpp

index 1a5dd60..89e49ef 100644 (file)
@@ -375,7 +375,8 @@ _FileUnzipperImpl::GetCurrentFileInfo(void* pUnZipFile, ZipEntry& entry) const
                pZipEntryInfo->__compressionLevel = DEFAULT_COMPRESSION;
        }
 
-       pZipEntryInfo->__isDirectory = (unzFileInfo.external_fa == 16) ? true : false;
+       const int length = (pZipEntryInfo->__name).GetLength();
+       pZipEntryInfo->__isDirectory = ((pZipEntryInfo->__name)[length - 1] == '/') ? true : false;
        pZipEntryInfo->__compressedSize = unzFileInfo.compressed_size;
        pZipEntryInfo->__uncompressedSize = unzFileInfo.uncompressed_size;
        pZipEntryInfo->__archiveName = archieveName;