mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-06 21:00:22 +00:00
Improved file reader detection
This commit is contained in:
parent
3fe6482b42
commit
816f166af1
@ -520,6 +520,15 @@ public class ExtractedTextViewer implements TextViewer {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Often times there is an exception when trying to initiale a reader,
|
||||||
|
// thus making that specific file "unsupported". The only way to identify
|
||||||
|
// this situation is to initialize the reader.
|
||||||
|
try {
|
||||||
|
FileReaderExtractedText tmp = new FileReaderExtractedText(file);
|
||||||
|
} catch (TextExtractorFactory.NoTextExtractorFound | TextExtractor.InitReaderException ex) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user