Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

jsipfs cat on a directory not working correctly #1142

@alanshaw

Description

@alanshaw
  • Version: 0.27.3
  • Platform: macOS 10.13.1
  • Subsystem: files

Type:

Bug

Severity:

High

Description:

ipfs cat on a directory displays the contents of a file in a sub directory, not the error "this dag node is a directory"

Steps to reproduce the error:

$ jsipfs init
initializing ipfs node at /Users/alan/.jsipfs
generating 2048-bit RSA keypair...done
peer identity: QmU8eJXWVYudzSrV5fxQuptmK1haqMG6E1eKP47xuF4e1K
to get started, enter:

	 jsipfs files cat /ipfs/QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/readme

lets cat that directory:

$ jsipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr
WIP

# 0.0 - Introduction

Welcome to IPFS! This tour will guide you through a few of the
features of this tool, and the most common commands. Then, it will
immerse you into the world of merkledags and the amazing things
you can do with them.

...

Wait, I was expecting some sort of directory error...

$ ipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr
Error: this dag node is a directory

...yeah like that

$ ipfs cat QmfGBRT6BbWJd7yUc2uYdaUZJBbnEFvTqehPFoSMQ6wgdr/tour/0.0-intro
WIP

# 0.0 - Introduction

Welcome to IPFS! This tour will guide you through a few of the
features of this tool, and the most common commands. Then, it will
immerse you into the world of merkledags and the amazing things
you can do with them.

...

weirdness, it is displaying a file in a sub folder...

Metadata

Metadata

Assignees

Labels

P1High: Likely tackled by core team if no one steps upexp/expertHaving worked on the specific codebase is importanthelp wantedSeeking public contribution on this issue

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions