Add in commented code for keeping the zip file in sync if we decide it's needed.

This commit is contained in:
Mike Auty
2018-09-03 22:14:48 +01:00
parent abee0f8de7
commit dd5edc395a
@@ -38,6 +38,15 @@ class LinuxSymbolCache(interfaces.automagic.AutomagicInterface):
vollog.log(constants.LOGLEVEL_V,
"Removing cached path {} for banner {}: file does not exist".format(path, banner))
linux_banners[banner].remove(path)
# This is probably excessive, but it's here if we need it
# if url.scheme == 'jar':
# zip_file, zip_path = url.path.split("!")
# zip_file = urllib.parse.urlparse(zip_file).path
# if ((not os.path.exists(zip_file)) or (zip_path not in zipfile.ZipFile(zip_file).namelist())):
# vollog.log(constants.LOGLEVEL_V,
# "Removing cached path {} for banner {}: file does not exist".format(path, banner))
# linux_banners[banner].remove(path)
if not linux_banners[banner]:
remove_banners.append(banner)
for remove_banner in remove_banners: