Skip to content
This repository has been archived by the owner on Jul 7, 2024. It is now read-only.
/ Orion Public archive

Skip download if the user didn't select a dir, fix StorageList's checkboxes #102

Merged

Conversation

kernelwhisperer
Copy link
Contributor

What changed?

Fixed https://dev.siderus.team/issues/108 (Cannot read property '0' of undefined)

While working on this I found 2 more bugs, one of which I fixed:

  1. When I select a second element, this.props.storageStore.selected.length is actually 0, because the equality check fails (it thinks it's the same element), therefore clicking 'Download' after checking 2 items did nothing.

  2. (not fixed) When downloading more than 1 item, the loading wheel never disappears even though the files were saved. I dug a bit into this and it looks like when we call saveFileToPath twice, the promise resolves only once. My fear is that we can't use IPFS_CLIENT.files.getReadableStream(hash) concurrently ... thoughts?

@koalalorenzo
Copy link
Member

In case the directories already exists the Promise Chain fails.
We should probably skip errors when creating directories:

Error: EEXIST: file already exists, mkdir '/Users/koalalorenzo/Downloads/QmS4ustL54uo8FzR9455qaxZwuMiUhyvMcX9Ba8nUH4uVv'

https://sentry.io/siderus-opensource/orion/issues/552911163/
I will create a new task for this.

@kernelwhisperer kernelwhisperer merged commit 2be3a09 into master May 10, 2018
@koalalorenzo koalalorenzo deleted the bugfix/108-cannot-read-property-0-of-undefined branch May 10, 2018 07:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants