mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +00:00
Made changes due to FsContent.getFileSystem now throwing TskCoreException.
This commit is contained in:
parent
e62b062aa7
commit
a8f6393c8a
@ -162,31 +162,25 @@ class ViewContextAction extends AbstractAction {
|
|||||||
@Override
|
@Override
|
||||||
public List<Content> visit(Directory drctr) {
|
public List<Content> visit(Directory drctr) {
|
||||||
ret.add(drctr);
|
ret.add(drctr);
|
||||||
if (drctr.isRoot()) {
|
Content parent = null;
|
||||||
return visit(drctr.getFileSystem());
|
try {
|
||||||
} else {
|
parent = drctr.getParent();
|
||||||
try {
|
} catch (TskCoreException ex) {
|
||||||
return drctr.getParentDirectory().accept(this);
|
logger.log(Level.SEVERE, "Couldn't get parent of Directory: " + drctr, ex);
|
||||||
} catch (TskException ex) {
|
|
||||||
logger.log(Level.WARNING, "Couldn't get directory's parent directory", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ret;
|
return parent.accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Content> visit(File file) {
|
public List<Content> visit(File file) {
|
||||||
ret.add(file);
|
ret.add(file);
|
||||||
if (file.isRoot()) {
|
Content parent = null;
|
||||||
return visit(file.getFileSystem());
|
try {
|
||||||
} else {
|
parent = file.getParent();
|
||||||
try {
|
} catch (TskCoreException ex) {
|
||||||
return file.getParentDirectory().accept(this);
|
logger.log(Level.SEVERE, "Couldn't get parent of File: " + file, ex);
|
||||||
} catch (TskException ex) {
|
|
||||||
logger.log(Level.WARNING, "Couldn't get file's parent directory", ex);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ret;
|
return parent.accept(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -606,7 +606,16 @@ class IngestScheduler {
|
|||||||
|
|
||||||
//skip files in root dir, starting with $, containing : (not default attributes)
|
//skip files in root dir, starting with $, containing : (not default attributes)
|
||||||
//with meta address < 32, i.e. some special large NTFS and FAT files
|
//with meta address < 32, i.e. some special large NTFS and FAT files
|
||||||
final TskData.TSK_FS_TYPE_ENUM fsType = f.getFileSystem().getFsType();
|
FileSystem fs = null;
|
||||||
|
try {
|
||||||
|
fs = f.getFileSystem();
|
||||||
|
} catch (TskCoreException ex) {
|
||||||
|
logger.log(Level.SEVERE, "Could not get FileSystem for " + f, ex);
|
||||||
|
}
|
||||||
|
TskData.TSK_FS_TYPE_ENUM fsType = TskData.TSK_FS_TYPE_ENUM.TSK_FS_TYPE_UNSUPP;
|
||||||
|
if (fs != null) {
|
||||||
|
fsType = fs.getFsType();
|
||||||
|
}
|
||||||
|
|
||||||
if ((fsType.getValue() & FAT_NTFS_FLAGS) == 0) {
|
if ((fsType.getValue() & FAT_NTFS_FLAGS) == 0) {
|
||||||
//not fat or ntfs, accept all files
|
//not fat or ntfs, accept all files
|
||||||
|
Loading…
x
Reference in New Issue
Block a user