Skip to content

Close FileInputStream in code#5072

Open
tejasae-afk wants to merge 1 commit intotermux:masterfrom
tejasae-afk:fix/close-fileinputstream-in-code
Open

Close FileInputStream in code#5072
tejasae-afk wants to merge 1 commit intotermux:masterfrom
tejasae-afk:fix/close-fileinputstream-in-code

Conversation

@tejasae-afk
Copy link
Copy Markdown

The current code in app/src/main/java/com/termux/app/api/file/FileReceiverActivity.java likely works fine most of the time, but The resource opened there can leak if code exits on an error path. this patch moves the allocation into try-with-resources so cleanup happens on every exit path. Close this if it’s not worth it.

Happy to revise the approach or close this if it doesn’t fit — you know the codebase far better than I do.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant