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

Commit 7bcb8e6

Browse files
Mauve SignweaverMauve Signweaver
Mauve Signweaver
authored and
Mauve Signweaver
committed
Allow reading rawLeaves in MFS
1 parent e85e5b6 commit 7bcb8e6

File tree

1 file changed

+2
-2
lines changed
  • packages/ipfs-core/src/components/files

1 file changed

+2
-2
lines changed

packages/ipfs-core/src/components/files/read.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,8 @@ export function createRead (context) {
3939
const mfsPath = await toMfsPath(context, path, options)
4040
const result = await exporter(mfsPath.mfsPath, context.repo.blocks)
4141

42-
if (result.type !== 'file') {
43-
throw errCode(new Error(`${path} was not a file`), 'ERR_NOT_FILE')
42+
if (result.type !== 'file' && result.type !== 'raw') {
43+
throw errCode(new Error(`${path} was not a file or raw bytes`), 'ERR_NOT_FILE')
4444
}
4545

4646
if (!result.content) {

0 commit comments

Comments
 (0)