blixt-wallet icon indicating copy to clipboard operation
blixt-wallet copied to clipboard

Use FileUtils.copy

Open sesam opened this issue 4 years ago • 1 comments

Untested! This assumes we have compileSdkVersion 29 or higher. This copy method might be faster, or if noting else, less own code to maintain.

I found this since the code scanner warned of potential memory leak (unclosed file descriptors) if copying fails. If using FileUtils won't work, we should add a finally block that ensures the Streams get closed and garbage collected.

sesam avatar Mar 07 '21 09:03 sesam

Thanks for the pull request, I'll get back to you about this once I've tested it.

hsjoberg avatar Mar 08 '21 14:03 hsjoberg