mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 16:06:15 +00:00
Revert "Remove code to search InternalPythonModules from python/JythonModuleLoader"
This reverts commit 6d2c46593266dc99b88bc37480a1830f96a62632.
This commit is contained in:
parent
f1fed22825
commit
ef501a61f2
@ -68,11 +68,19 @@ public final class JythonModuleLoader {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static <T> List<T> getInterfaceImplementations(LineFilter filter, Class<T> interfaceClass) {
|
private static <T> List<T> getInterfaceImplementations(LineFilter filter, Class<T> interfaceClass) {
|
||||||
PythonInterpreter interpreter = new PythonInterpreter();
|
|
||||||
List<T> objects = new ArrayList<>();
|
List<T> objects = new ArrayList<>();
|
||||||
File pythonModulesDir = new File(PlatformUtil.getUserPythonModulesPath());
|
Set<File> pythonModuleDirs = new HashSet<>();
|
||||||
File[] files = pythonModulesDir.listFiles();
|
PythonInterpreter interpreter = new PythonInterpreter();
|
||||||
for (File file : files) {
|
|
||||||
|
// add python modules from 'autospy/build/cluster/InternalPythonModules' folder
|
||||||
|
// which are copied from 'autopsy/*/release/InternalPythonModules' folders.
|
||||||
|
for (File f : InstalledFileLocator.getDefault().locateAll("InternalPythonModules", JythonModuleLoader.class.getPackage().getName(), false)) { //NON-NLS
|
||||||
|
Collections.addAll(pythonModuleDirs, f.listFiles());
|
||||||
|
}
|
||||||
|
// add python modules from 'testuserdir/python_modules' folder
|
||||||
|
Collections.addAll(pythonModuleDirs, new File(PlatformUtil.getUserPythonModulesPath()).listFiles());
|
||||||
|
|
||||||
|
for (File file : pythonModuleDirs) {
|
||||||
if (file.isDirectory()) {
|
if (file.isDirectory()) {
|
||||||
File[] pythonScripts = file.listFiles(new PythonScriptFileFilter());
|
File[] pythonScripts = file.listFiles(new PythonScriptFileFilter());
|
||||||
for (File script : pythonScripts) {
|
for (File script : pythonScripts) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user