Skip to content
This repository was archived by the owner on Jan 9, 2025. It is now read-only.

closing file after deleting#408

Merged
hg-ms merged 1 commit intomasterfrom
bug/fileNotClosedAfterDeleting
Aug 16, 2022
Merged

closing file after deleting#408
hg-ms merged 1 commit intomasterfrom
bug/fileNotClosedAfterDeleting

Conversation

@hg-ms
Copy link
Copy Markdown
Contributor

@hg-ms hg-ms commented Aug 16, 2022

When deleting a StorageFile its delete method ensures that the StorageFile is writable. The ensureWritable method internally opens a FileChannel if the NIO AFS is used. That FileChannel is not closed after deleting the file (in the app). The open file channel may pevent the OS from deleting the file and releasing disk space.

@hg-ms hg-ms requested a review from fh-ms August 16, 2022 10:57
@hg-ms hg-ms merged commit 0d6fd04 into master Aug 16, 2022
@hg-ms hg-ms deleted the bug/fileNotClosedAfterDeleting branch August 16, 2022 11:20
@fh-ms fh-ms added this to the 08.00.00 milestone Dec 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants