diff --git a/lib/oath/icon_provider/icon_pack_manager.dart b/lib/oath/icon_provider/icon_pack_manager.dart index 0fe26c08..91c55321 100644 --- a/lib/oath/icon_provider/icon_pack_manager.dart +++ b/lib/oath/icon_provider/icon_pack_manager.dart @@ -151,17 +151,17 @@ class IconPackManager extends ChangeNotifier { final destination = Directory('${tempDirectory.path}ex${Platform.pathSeparator}'); - final archive = ZipDecoder().decodeBytes(bytes); + final archive = ZipDecoder().decodeBytes(bytes, verify: true); for (final file in archive) { final filename = file.name; - if (file.isFile) { + if (file.size > 0) { final data = file.content as List; - _log.debug('Writing file: ${destination.path}$filename'); + _log.debug('Writing file: ${destination.path}$filename (size: ${file.size})'); final extractedFile = File('${destination.path}$filename'); final createdFile = await extractedFile.create(recursive: true); await createdFile.writeAsBytes(data); } else { - _log.debug('Writing directory: ${destination.path}$filename'); + _log.debug('Writing directory: ${destination.path}$filename (size: ${file.size})'); Directory('${destination.path}$filename').createSync(recursive: true); } }