From 77468223e26720a60e930394a8472ba4abcc631b Mon Sep 17 00:00:00 2001 From: Trivernis Date: Thu, 9 May 2019 18:09:27 +0200 Subject: [PATCH] Cache-dir fix - fixed cache name generation to use only the last part of the path --- riddle.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/riddle.py b/riddle.py index fac9883..f9de30c 100644 --- a/riddle.py +++ b/riddle.py @@ -266,10 +266,11 @@ def main(): comp_mode = zipfile.ZIP_STORED if options.lzma: comp_mode = zipfile.ZIP_LZMA + cachedir = '.cache-' + dldest.split('/')[-1] images = filter_zip_files(images, dldest+'.zip') - download_images(images, '.cache-'+dldest) - compress_folder('.cache-'+dldest, dldest+'.zip', compression=comp_mode) - shutil.rmtree('.cache-'+dldest) + download_images(images, cachedir) + compress_folder(cachedir, dldest+'.zip', compression=comp_mode) + shutil.rmtree(cachedir) else: download_images(images, dldest) print('[+] All downloads finished')