ipfs / ipfs/kubo

Gateway shows file icon for directory called `protocol.ai` instead of directory icon

Open
#4,617 5 comments 0 reactions 0 assignees View on GitHub
kind/bug topic/gateway
Dominant language
Go
Stars
17.1k
Forks
3.2k
Avg merge
3d 18h
Merged PRs (30d)
11

Description

#### Version information:

```
go-ipfs version: 0.4.12-
Repo version: 6
System version: amd64/linux
Golang version: go1.9.2
```

#### Type:
Bug

#### Severity:
Low
#### Description:

When adding a directory that has a link `protocol.ai`, the gateway shows this directory as a Adobe Illustrator file (I think) rather than a directory.

Steps to reproduce:

```
$ mkdir test
$ mkdir test/protocol.ai
$ mkdir test/libp2p.io
$ echo "protocol.ai" > test/protocol.ai/index.html
$ echo "libp2p.io" > test/libp2p.io/index.html
$ ipfs add -rQ test
QmQ9C4WiXrPE2NUW8GM3GwXdZudvxzJynMM7XwzBxi3CeX
```

Looking at the gateway on the test directory (https://ipfs.io/ipfs/QmQ9C4WiXrPE2NUW8GM3GwXdZudvxzJynMM7XwzBxi3CeX) you'll see the following:

![image](https://user-images.githubusercontent.com/459764/35471911-39543996-0365-11e8-95e8-fa50853fcd65.png)

Notice the `protocol.ai` link shows some file extension icon instead of the directory icon.

Edit: it still works as a directory though, as you can navigate to https://ipfs.io/ipfs/QmQ9C4WiXrPE2NUW8GM3GwXdZudvxzJynMM7XwzBxi3CeX/protocol.ai/ and see the right output. But the icon for the directory is wrong.

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.