1
0
mirror of https://github.com/elisspace/autopsy.git synced 2026-09-03 06:25:58 +00:00

1142: fix DrawableFile.getDataSource()

This commit is contained in:
Raman
2018-11-29 11:53:07 -05:00
parent 6d09205d61
commit 371b00a9dc

View File

@@ -158,7 +158,11 @@ public abstract class DrawableFile {
}
public DataSource getDataSource() throws TskCoreException, TskDataException {
return getSleuthkitCase().getDataSource(file.getDataSource().getId());
if (file.getDataSource() instanceof DataSource) {
return (DataSource)file.getDataSource();
} else {
throw new TskCoreException(String.format("Failed to get data source for drawable file (id = %s)", file.getId()));
}
}
private Pair<DrawableAttribute<?>, Collection<?>> makeAttributeValuePair(DrawableAttribute<?> attribute) {