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
|
||||
public List<Content> visit(Directory drctr) {
|
||||
ret.add(drctr);
|
||||
if (drctr.isRoot()) {
|
||||
return visit(drctr.getFileSystem());
|
||||
} else {
|
||||
Content parent = null;
|
||||
try {
|
||||
return drctr.getParentDirectory().accept(this);
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get directory's parent directory", ex);
|
||||
parent = drctr.getParent();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Couldn't get parent of Directory: " + drctr, ex);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
return parent.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Content> visit(File file) {
|
||||
ret.add(file);
|
||||
if (file.isRoot()) {
|
||||
return visit(file.getFileSystem());
|
||||
} else {
|
||||
Content parent = null;
|
||||
try {
|
||||
return file.getParentDirectory().accept(this);
|
||||
} catch (TskException ex) {
|
||||
logger.log(Level.WARNING, "Couldn't get file's parent directory", ex);
|
||||
parent = file.getParent();
|
||||
} catch (TskCoreException ex) {
|
||||
logger.log(Level.SEVERE, "Couldn't get parent of File: " + file, ex);
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
return parent.accept(this);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -606,7 +606,16 @@ class IngestScheduler {
|
||||
|
||||
//skip files in root dir, starting with $, containing : (not default attributes)
|
||||
//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) {
|
||||
//not fat or ntfs, accept all files
|
||||
|
Loading…
x
Reference in New Issue
Block a user