decrypt_chunks_in_place(args.key, path_in_tmp)
print(f'{args.path} decrypted.')
- if zipfile.is_zipfile(path_in_tmp):
+ if zipfile.is_zipfile(path_in_tmp) and not args.leave_as_archive:
os.makedirs(args.output, exist_ok=True)
shutil.unpack_archive(path_in_tmp, extract_dir=args.output, format='zip')
print(f'Unarchived to {args.output}.')
download_parser.add_argument('-t', dest='token', required=True,
type=lambda x : file_path(parser, x), help='File with the '
'authentication token.')
+ download_parser.add_argument('--leave-as-archive', action='store_true',
+ help='Do not unarchive a directory after download.')
download_parser.set_defaults(func=download)
upload_parser = subparsers.add_parser('upload', help='Upload a file. '