mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-14 17:06:16 +00:00
4440 fix bug with content viewer not being enabled for non-file common property search results
This commit is contained in:
parent
36286e742f
commit
29aaf1d6b6
@ -122,20 +122,8 @@ class OtherOccurrenceNodeInstanceData implements OtherOccurrenceNodeData {
|
||||
*/
|
||||
boolean isCentralRepoNode() {
|
||||
return (originalCorrelationInstance != null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Uses the saved instance plus type and value to make a new CorrelationAttribute.
|
||||
* Should only be called if isCentralRepoNode() is true.
|
||||
* @return the newly created CorrelationAttribute
|
||||
*/
|
||||
CorrelationAttributeInstance getCorrelationAttribute() throws EamDbException {
|
||||
if (! isCentralRepoNode() ) {
|
||||
throw new EamDbException("Can not create CorrelationAttribute for non central repo node");
|
||||
}
|
||||
return originalCorrelationInstance;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the case name
|
||||
* @return the case name
|
||||
@ -206,7 +194,7 @@ class OtherOccurrenceNodeInstanceData implements OtherOccurrenceNodeData {
|
||||
* @return the original abstract file
|
||||
*/
|
||||
AbstractFile getAbstractFile() throws EamDbException {
|
||||
if (originalCorrelationInstance == null) {
|
||||
if (originalAbstractFile == null) {
|
||||
throw new EamDbException("AbstractFile is null");
|
||||
}
|
||||
return originalAbstractFile;
|
||||
|
@ -77,7 +77,6 @@ final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttr
|
||||
|
||||
// Only attempt to make the abstract file if the attribute is from the current case
|
||||
if (currentCase.getName().equals(currentAttributeInstance.getCorrelationCase().getCaseUUID())) {
|
||||
|
||||
SleuthkitCase tskDb = currentCase.getSleuthkitCase();
|
||||
|
||||
// Find the correct data source
|
||||
@ -98,8 +97,7 @@ final public class CentralRepoCommonAttributeInstance extends AbstractCommonAttr
|
||||
parentPath += File.separator;
|
||||
}
|
||||
parentPath = parentPath.replace("\\", "/");
|
||||
|
||||
final String whereClause = String.format("lower(name) = '%s' AND md5 = '%s' AND lower(parent_path) = '%s' AND data_source_obj_id = %s", fileName, currentAttribute.getCorrelationValue(), parentPath, dataSource.get().getId());
|
||||
final String whereClause = String.format("lower(name) = '%s' AND lower(parent_path) = '%s' AND data_source_obj_id = %s", fileName, parentPath, dataSource.get().getId());
|
||||
List<AbstractFile> potentialAbstractFiles = tskDb.findAllFilesWhere(whereClause);
|
||||
|
||||
if (potentialAbstractFiles.isEmpty()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user