From 87314fb36dfc16f6277e487e2a526dac140e538d Mon Sep 17 00:00:00 2001 From: Brian Carrier <carrier@sleuthkit.org> Date: Thu, 19 Sep 2013 16:58:44 -0400 Subject: [PATCH] make smaller error message when local file cannot be read --- bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java b/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java index a78ce64f2..d48a215f6 100644 --- a/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java +++ b/bindings/java/src/org/sleuthkit/datamodel/AbstractFile.java @@ -694,7 +694,7 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE try { localFileHandle = new RandomAccessFile(localFile, "r"); } 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); //file could have been deleted or moved throw new TskCoreException(msg, ex); @@ -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 bytesRead = localFileHandle.read(buf, 0, (int) len); } 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); //local file could have been deleted / moved throw new TskCoreException(msg, ex); @@ -828,7 +828,7 @@ public void close() { try { localFileHandle.close(); } 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; } -- GitLab