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

Commit

Permalink
Allow reading rawLeaves in MFS
Browse files Browse the repository at this point in the history
  • Loading branch information
Mauve Signweaver authored and Mauve Signweaver committed Jan 10, 2023
1 parent e85e5b6 commit 7bcb8e6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/ipfs-core/src/components/files/read.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ export function createRead (context) {
const mfsPath = await toMfsPath(context, path, options)
const result = await exporter(mfsPath.mfsPath, context.repo.blocks)

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

if (!result.content) {
Expand Down

0 comments on commit 7bcb8e6

Please sign in to comment.