Skip to content
Snippets Groups Projects
Commit d6df1ec1 authored by Ann Priestman's avatar Ann Priestman
Browse files

Removed absolute path arg

parent 4c0fc425
No related branches found
No related tags found
No related merge requests found
......@@ -892,10 +892,8 @@ protected final int readLocal(byte[] buf, long offset, long len) throws TskCoreE
* read() will read the file in the local path.
*
* @param localPath local path to be set
* @param isAbsolute true if the path is absolute, false if relative to the
* case db
*/
void setLocalFilePath(String localPath, boolean isAbsolute) {
void setLocalFilePath(String localPath) {
if (localPath == null || localPath.equals("")) {
this.localPath = "";
......@@ -903,7 +901,8 @@ void setLocalFilePath(String localPath, boolean isAbsolute) {
localPathSet = false;
} else {
this.localPath = localPath;
if (isAbsolute) {
if (localPath.startsWith("/") || localPath.startsWith("\\")
|| localPath.matches("[A-Za-z]:[/\\\\].*")) {
this.localAbsPath = localPath;
} else {
this.localAbsPath = getSleuthkitCase().getDbDirPath() + java.io.File.separator + this.localPath;
......@@ -1256,7 +1255,7 @@ public short getAttrId() {
*/
@Deprecated
protected void setLocalPath(String localPath, boolean isAbsolute) {
setLocalFilePath(localPath, isAbsolute);
setLocalFilePath(localPath);
}
/*
......
......@@ -103,7 +103,7 @@ public class DerivedFile extends AbstractFile {
super(db, objId, dataSourceObjectId, TskData.TSK_FS_ATTR_TYPE_ENUM.TSK_FS_ATTR_TYPE_DEFAULT, 0,
name, TSK_DB_FILES_TYPE_ENUM.LOCAL, 0L, 0, dirType, metaType, dirFlag,
metaFlags, size, ctime, crtime, atime, mtime, (short) 0, 0, 0, md5Hash, knownState, parentPath, mimeType, extension);
setLocalFilePath(localPath, false);
setLocalFilePath(localPath);
setEncodingType(encodingType);
}
......
......@@ -98,7 +98,7 @@ public class LocalFile extends AbstractFile {
if (parentId > 0) {
setParentId(parentId);
}
super.setLocalFilePath(localPath, true);
super.setLocalFilePath(localPath);
setEncodingType(encodingType);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment