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.

"ipfs.get(cid, { archive: false })" ignores the archive flag #3894

@jurelik

Description

@jurelik
  • Version:
    go-ipfs: 0.9.1
    js-ipfs: 0.11.0
    ipfs-http-client: 53.0.0

  • Platform:
    Darwin jure.local 18.7.0 Darwin Kernel Version 18.7.0: Tue Jun 22 19:37:08 PDT 2021; root:xnu-4903.278.70~1/RELEASE_X86_64 x86_64

  • Subsystem:
    Get

Severity:

Medium

Description:

I would like to get a folder without it being put into a tarball. This works in the go-ipfs CLI by not applying the -a flag, but going through either ipfs-core or ipfs-http-client+go-ipfs, the archive:false flag doesn't work. Instead, I always get a tar version of the folder.

Steps to reproduce the error:

const IPFS = require('ipfs-core');
const fsp = require('fs').promises;
const fs = require('fs');
const path = require('path');

const func = async () => {
  const ipfs = await IPFS.create()

  await fsp.mkdir(folderPath, { recursive: true });

  const stream = fs.createWriteStream(path.join(folderPath, folderName));
  for await (const file of ipfs.get(folderCID, { archive: false })) stream.write(file);
  stream.end();
}

func();

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/supportA question or request for support

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions