-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Conversation
…with an empty function but with null'
…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
…hile writing; Take the nr. of bytes actually read in the InputtStream into account when writing the buffer
This seems to have important fixes for Android, could it be merged @wkh237 ? |
@lll000111 any chance you could merge this? I know @wkh237 is inactive, could you take over or maintain a fork? |
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 |
@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. |
@Jacse Given the many PRs that have accumulated I thought my call for a maintainer at the top of the |
@lll000111 I don't mind giving a hand with the iOS maintenance |
@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. |
@lll000111 Understood |
…d Studio; min. Android API version now is 19 instead of 16
…et rid of most warnings
…et rid of most warnings
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
… that is already closed - no error
…y "onData" callback calling read stream API
…er already checking for 'ascii' encoding, which requires an array)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
missing ' at RNFetchBlobWriteStream.js:66
I fixed a handful of issues from the list. Everything is for Android except for a very small change for
unlink
on iOS.