Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Input File Stream doesn't close when submitting files #8

Open
BrantNielsen opened this issue Jun 11, 2014 · 0 comments
Open

Input File Stream doesn't close when submitting files #8

BrantNielsen opened this issue Jun 11, 2014 · 0 comments

Comments

@BrantNielsen
Copy link

Had an issue where I couldn't manipulate course zip files on my server after importing them to SCORM Cloud due to Java not releasing the files after uploading them. I'd have to restart the whole server in order to get write access to my course files again. After doing some searching online, I found this issue normally happens when file input streams are not properly closed. After combing through the library code, lo and behold I found that the BufferedInputStream in the Utils.bufferedCopyStream method is never closed after the file is read into the output stream, causing Java to hold onto the file long after its needed.

The fix was simple: add the line bis.close(); after the data is read and before the method returns. That made it so I could properly manipulate my files after the import process was finished.

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

No branches or pull requests

1 participant