Skip to content

Commit

Permalink
fix: check only for recursive pins
Browse files Browse the repository at this point in the history
`pin.ls` may get really slow for mid-range repos,
so we only check for explicit (recursive) ones

Context: #360 (comment)
Closes #360
  • Loading branch information
lidel committed Sep 22, 2018
1 parent 83f224c commit ad84b82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion add-on/src/popup/browser-action/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ module.exports = (state, emitter) => {
if (state.isPinning || state.isUnPinning) return
try {
const currentPath = await resolveToPinPath(ipfs, status.currentTab.url)
const response = await ipfs.pin.ls(currentPath, { quiet: true })
const response = await ipfs.pin.ls(currentPath, { type: 'recursive', quiet: true })
console.log(`positive ipfs.pin.ls for ${currentPath}: ${JSON.stringify(response)}`)
state.isPinned = true
} catch (error) {
Expand Down

0 comments on commit ad84b82

Please sign in to comment.