ipfs / ipfs/kubo

ERROR commands/h: directory already has entry by that name client.go:247

Open
#3,647 1 comment 0 reactions 0 assignees View on GitHub
kind/bug topic/api topic/commands:add
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:
go-ipfs
$ ipfs version
ipfs version 0.4.4
"AgentVersion": "go-libp2p/3.3.4",
"ProtocolVersion": "ipfs/0.1.0"

#### Type:
Bug

#### Priority:
P4

#### Description:
Problem reduplication:
```
mkdir -p t1/b t2/b
echo 'hello' > t1/b/1
echo 'ipfs' > t2/b/1

ipfs add -r t1/b t2/b
```

added TdkocRicokeUoidowknodiIopdjiouodiodknEdolppCFD b/1
11 B / 8.01 KB [>--------------------------------------------------] 0.13% 2s
> **13:25:21.801 ERROR commands/h: directory already has entry by that name client.go:247**

go-ipfs daemon shows another error message:

> 13:25:21.795 ERROR commands/h: err: directory already has entry by that name handler.go:288

This problem is probably caused by the relative path used by ipfs.
Folder "t1/b" and "t2/b" use the same relative path "b":
$ ipfs add -r t1/b
added TdkocRicokeUoidowknodiIopdjiouodiodknEdolppCFD b/1
added TdidowknosRRYldpwjfYUAPeYdoxIeYyiCEDTFdopwkIks b
$ ipfs add -r t2/b
added TdkdEioOWvkOUdCxuakoTIKFYKhioehUGBLLeiwGYTJBsj b/1
added TdpeioddisukefuElkkdiuyYUiewkfjYUigenjITOhehIO b

So the workaround is obvious: add the two folders separately.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.