Skip to content
This repository was archived by the owner on Mar 10, 2020. It is now read-only.

Commit 51cb37b

Browse files
committed
fix: don't expect ipfs to preserve a leading slash
Go-ipfs now normalizes paths before adding files. This will: * remove any leading slashes. * remove any `/./` components. * normalize any `/../` components. That breaks this test which assumes that paths are returned _exactly_ as specified.
1 parent 45da688 commit 51cb37b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/src/miscellaneous/resolve.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ module.exports = (createCommon, options) => {
7171

7272
// Test resolve turns /ipfs/QmRootHash/path/to/file into /ipfs/QmFileHash
7373
it('should resolve an IPFS path link', (done) => {
74-
const path = '/path/to/testfile.txt'
74+
const path = 'path/to/testfile.txt'
7575
const content = loadFixture('js/test/fixtures/testfile.txt', 'interface-ipfs-core')
7676

7777
ipfs.add([{ path, content }], { wrapWithDirectory: true }, (err, res) => {

0 commit comments

Comments
 (0)