Cache-dir fix

- fixed cache name generation to use only the last part of the path
pull/6/head
Trivernis 6 years ago
parent 33665b44ae
commit 77468223e2

@ -266,10 +266,11 @@ def main():
comp_mode = zipfile.ZIP_STORED comp_mode = zipfile.ZIP_STORED
if options.lzma: if options.lzma:
comp_mode = zipfile.ZIP_LZMA comp_mode = zipfile.ZIP_LZMA
cachedir = '.cache-' + dldest.split('/')[-1]
images = filter_zip_files(images, dldest+'.zip') images = filter_zip_files(images, dldest+'.zip')
download_images(images, '.cache-'+dldest) download_images(images, cachedir)
compress_folder('.cache-'+dldest, dldest+'.zip', compression=comp_mode) compress_folder(cachedir, dldest+'.zip', compression=comp_mode)
shutil.rmtree('.cache-'+dldest) shutil.rmtree(cachedir)
else: else:
download_images(images, dldest) download_images(images, dldest)
print('[+] All downloads finished') print('[+] All downloads finished')

Loading…
Cancel
Save