mirror of
https://github.com/overcuriousity/autopsy-flatpak.git
synced 2025-07-12 07:56:16 +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) {
|
||||
PythonInterpreter interpreter = new PythonInterpreter();
|
||||
List<T> objects = new ArrayList<>();
|
||||
File pythonModulesDir = new File(PlatformUtil.getUserPythonModulesPath());
|
||||
File[] files = pythonModulesDir.listFiles();
|
||||
for (File file : files) {
|
||||
Set<File> pythonModuleDirs = new HashSet<>();
|
||||
PythonInterpreter interpreter = new PythonInterpreter();
|
||||
|
||||
// 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()) {
|
||||
File[] pythonScripts = file.listFiles(new PythonScriptFileFilter());
|
||||
for (File script : pythonScripts) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user