fix the fetched file name

This commit is contained in:
Leo Arias 2017-12-03 18:30:17 +00:00
parent 2948a4dbd2
commit 207e6e2a2e
1 changed files with 3 additions and 0 deletions

3
ipfs
View File

@ -124,6 +124,9 @@ class IPFS_method():
os.chdir(os.path.dirname(filename))
try:
ipfs.get(ipfs_file_path)
os.rename(
os.path.basename(ipfs_file_path),
filename)
finally:
os.chdir(cwd)