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

0.10.9 #510

Closed
wants to merge 32 commits into from
Closed

0.10.9 #510

wants to merge 32 commits into from

Conversation

lll000111
Copy link
Contributor

@lll000111 lll000111 commented Sep 6, 2017

I fixed a handful of issues from the list. Everything is for Android except for a very small change for unlink on iOS.

…o locations) but throw an exception when it returns false
… in functionality, things like a semicolon that should be removed, linter errors suppressed, unused imports or variables, "this can be private"
…y are still there'

Use the boolean return value of "removeItemAtPath", the error object alone is not always set even when removal fails according to some answer I found on Stackoverflow
… a path but not for URIs'

Add an error stream event when the stream could not be created, instead of relying on the general catch (this satisfies Android Studio too)

Add a few {} for readability
- in readFile: Replace code introduced for issue #287 - The use of available() (InputStream) method is not recommended if one wants to get the definite size of the input. I replaced it with a dynamic method that reads the input stream until it ends, using ByteArrayOutputStream to assemble the result

- in getSystemFolders: handle the possibility that getExternalFilesDir() returns null

- suppress two IDE warnings about 1) an unused null assignment as signal to the GC (which probably really is not needed in tihs context), and 2) an unused parameter
…and no error was thrown (on Android 5.x devices only)
…because there was no directory check at that point
@lll000111 lll000111 mentioned this pull request Sep 16, 2017
…hile writing; Take the nr. of bytes actually read in the InputtStream into account when writing the buffer
@lll000111
Copy link
Contributor Author

@dantman So I pushed this too: 68ce5c4

@CptMaumau
Copy link

This seems to have important fixes for Android, could it be merged @wkh237 ?

@Jacse
Copy link
Contributor

Jacse commented Dec 29, 2017

@lll000111 any chance you could merge this? I know @wkh237 is inactive, could you take over or maintain a fork?

@lll000111
Copy link
Contributor Author

lll000111 commented Dec 29, 2017

I can't merge because I don't have a full environment (and no iOS at all), no time, I only care(d) about the filesystem access to begin with (and only on Android). Sorry! But what prevents you from forking the repo and applying the patch? Just for yourself, doesn't even have to happen on Github. Or just use my fork and the 0.10.9 branch which has that patch: https://github.com/lll000111/react-native-fetch-blob/tree/0.10.9

@Jacse
Copy link
Contributor

Jacse commented Dec 29, 2017

@lll000111 thanks for the quick reply! Completely understandable. That's probably what I'll end up doing, I was just hoping to see the library maintained.

@lll000111
Copy link
Contributor Author

@Jacse Given the many PRs that have accumulated I thought my call for a maintainer at the top of the README.md would yield more responses than none...

@jdmunro
Copy link

jdmunro commented Feb 6, 2018

@lll000111 I don't mind giving a hand with the iOS maintenance

@lll000111
Copy link
Contributor Author

@jdmunro Thanks, but I'm not maintaining anything, I became a "Collaborator" by accident, I just submitted lots of patches at some point, for stuff that I needed... The package needs to be forked and owned by somebody new, completely. All I can do is add a link to the README, I have no admin rights here.

@jdmunro
Copy link

jdmunro commented Feb 6, 2018

@lll000111 Understood

lll000111 added 14 commits May 31, 2018 14:21
…d Studio; min. Android API version now is 19 instead of 16
streams: change how they work, completely, but provide backwards compatibility
- uses a readChunk() method for ReadStream, no more "ticks" - the old behavior is recreated in the Javascript class by periodically calling reacChunk()
- don't create a new RNFetchBlob (Java) object, instead use a tiny "struct-like" class to remember the stream data (stream id and the respective InputStream or OutputStream instance)
… far only old stream version compatibility (i.e. I ran the original tests, the only change was that the stream creation method names changed to get a create... in front, and that they no longer return a Promise object); I had forgotten to update the WriteStream class
…er already checking for 'ascii' encoding, which requires an array)
Copy link

@G-2-Z G-2-Z left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lll000111 lll000111 closed this by deleting the head repository Oct 28, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants