Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
Sleuthkit
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IRT
Sleuthkit
Commits
87314fb3
Commit
87314fb3
authored
11 years ago
by
Brian Carrier
Browse files
Options
Downloads
Patches
Plain Diff
make smaller error message when local file cannot be read
parent
eeba90bf
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java
+3
-3
3 additions, 3 deletions
bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java
with
3 additions
and
3 deletions
bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java
+
3
−
3
View file @
87314fb3
...
@@ -694,7 +694,7 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE
...
@@ -694,7 +694,7 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE
try
{
try
{
localFileHandle
=
new
RandomAccessFile
(
localFile
,
"r"
);
localFileHandle
=
new
RandomAccessFile
(
localFile
,
"r"
);
}
catch
(
FileNotFoundException
ex
)
{
}
catch
(
FileNotFoundException
ex
)
{
final
String
msg
=
"Error reading local file: "
+
this
.
toString
()
;
final
String
msg
=
"Error reading local file: "
+
localAbsPath
;
logger
.
log
(
Level
.
SEVERE
,
msg
,
ex
);
logger
.
log
(
Level
.
SEVERE
,
msg
,
ex
);
//file could have been deleted or moved
//file could have been deleted or moved
throw
new
TskCoreException
(
msg
,
ex
);
throw
new
TskCoreException
(
msg
,
ex
);
...
@@ -712,7 +712,7 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE
...
@@ -712,7 +712,7 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE
//note, we are always writing at 0 offset of user buffer
//note, we are always writing at 0 offset of user buffer
bytesRead
=
localFileHandle
.
read
(
buf
,
0
,
(
int
)
len
);
bytesRead
=
localFileHandle
.
read
(
buf
,
0
,
(
int
)
len
);
}
catch
(
IOException
ex
)
{
}
catch
(
IOException
ex
)
{
final
String
msg
=
"Cannot read local file: "
+
this
.
toString
()
;
final
String
msg
=
"Cannot read local file: "
+
localAbsPath
;
logger
.
log
(
Level
.
SEVERE
,
msg
,
ex
);
logger
.
log
(
Level
.
SEVERE
,
msg
,
ex
);
//local file could have been deleted / moved
//local file could have been deleted / moved
throw
new
TskCoreException
(
msg
,
ex
);
throw
new
TskCoreException
(
msg
,
ex
);
...
@@ -828,7 +828,7 @@ public void close() {
...
@@ -828,7 +828,7 @@ public void close() {
try
{
try
{
localFileHandle
.
close
();
localFileHandle
.
close
();
}
catch
(
IOException
ex
)
{
}
catch
(
IOException
ex
)
{
logger
.
log
(
Level
.
SEVERE
,
"Could not close file handle for file: "
+
this
.
toString
(),
ex
);
logger
.
log
(
Level
.
SEVERE
,
"Could not close file handle for file: "
+
getParentPath
()
+
"/"
+
getName
(),
ex
);
}
}
localFileHandle
=
null
;
localFileHandle
=
null
;
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment