Skip to content
Snippets Groups Projects
Unverified Commit 74b48a70 authored by Richard Cordovano's avatar Richard Cordovano Committed by GitHub
Browse files

Merge pull request #1489 from raman-bt/4939-recentactivities-open-handles

8939: Recent activity model failing to close file handles
parents b5e621bd 08f95b4a
No related branches found
No related tags found
No related merge requests found
...@@ -129,7 +129,9 @@ public int read(byte[] buf, long offset, long len) throws TskCoreException { ...@@ -129,7 +129,9 @@ public int read(byte[] buf, long offset, long len) throws TskCoreException {
int totalBytesRead = 0; int totalBytesRead = 0;
ByteBuffer data = ByteBuffer.wrap(buf); ByteBuffer data = ByteBuffer.wrap(buf);
try { try {
fileChannel = FileChannel.open(pathAsPath, READ); if (fileChannel == null) {
fileChannel = FileChannel.open(pathAsPath, READ);
}
fileChannel.position(offset); fileChannel.position(offset);
int bytesRead = 0; int bytesRead = 0;
do { do {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment