SupraSummus / ipfs-api-mount

Mount IPFS directory as local FS.
MIT License
27 stars 5 forks source link

Not compatible with new CID: "ipfs_api_mount.ipfs.InvalidIPFSPathException" #24

Closed jcea closed 4 years ago

jcea commented 4 years ago

Apparently, current release is not compatible with new CID format, like /ipfs/bafybeieltqren5gbivmavam532nvlsyxy725bpxqk77zvmaflrdyvu4yxm:

jcea@jcea:/tmp$ ipfs resolve /ipns/ipfs.io
/ipfs/bafybeieltqren5gbivmavam532nvlsyxy725bpxqk77zvmaflrdyvu4yxm
jcea@jcea:/tmp$ ipfs-api-mount /ipfs/bafybeieltqren5gbivmavam532nvlsyxy725bpxqk77zvmaflrdyvu4yxm /tmp/a
Traceback (most recent call last):
  File "/usr/local/bin/ipfs-api-mount", line 57, in <module>
    IPFSMount(
  File "/usr/local/lib/python3.8/site-packages/ipfs_api_mount/__init__.py", line 32, in __init__
    self._validate_root_path()
  File "/usr/local/lib/python3.8/site-packages/ipfs_api_mount/__init__.py", line 35, in _validate_root_path
    if not self.ipfs.path_is_dir(self.root):
  File "/usr/local/lib/python3.8/site-packages/ipfs_api_mount/ipfs.py", line 182, in path_is_dir
    return self.cid_type(cid) in (
  File "/usr/local/lib/python3.8/site-packages/ipfs_api_mount/ipfs.py", line 174, in cid_type
    raise InvalidIPFSPathException()
ipfs_api_mount.ipfs.InvalidIPFSPathException
SupraSummus commented 4 years ago

Thanks for reporting. I'll have a look.

SupraSummus commented 4 years ago

Fix is merged. You can try installing from master or wait till next release. I'll release 0.3.2 version probably today.

SupraSummus commented 4 years ago

0.3.2 is out

jcea commented 4 years ago

Issue seems to be solved in release 0.3.2. Thanks.