From 938268a14774481855775ed61ea4cece9692d878 Mon Sep 17 00:00:00 2001 From: BonfaceKilz Date: Mon, 22 Mar 2021 16:56:22 +0300 Subject: Update where cached file is stored --- gn3/file_utils.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'gn3') diff --git a/gn3/file_utils.py b/gn3/file_utils.py index 4dcf296..5296613 100644 --- a/gn3/file_utils.py +++ b/gn3/file_utils.py @@ -5,6 +5,7 @@ import os import random import string import tarfile +import pathlib from functools import partial from typing import Dict @@ -90,6 +91,7 @@ def cache_ipfs_file(ipfs_file: str, if not os.path.exists(file_loc): client = ipfshttpclient.connect(ipfs_addr) client.get(ipfs_file, - target=os.path.join(cache_dir, - ipfs_file.split("ipfs/")[-1])) + target=pathlib.Path + (os.path.join(cache_dir, + ipfs_file.split("ipfs/")[-1])).parent) return file_loc -- cgit v1.2.3