Skip to content

Commit 2265592

Browse files
committed
fix dependency listener for symlinks
1 parent ee1b759 commit 2265592

File tree

1 file changed

+2
-3
lines changed
  • bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal

1 file changed

+2
-3
lines changed

bundles/org.openhab.automation.pythonscripting/src/main/java/org/openhab/automation/pythonscripting/internal/PythonScriptEngine.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,10 @@ public PythonScriptEngine(PythonDependencyTracker pythonDependencyTracker, int i
189189
@Override
190190
public void checkAccess(Path path, Set<? extends AccessMode> modes,
191191
LinkOption... linkOptions) throws IOException {
192-
193-
if (path.startsWith(PythonScriptEngineFactory.PYTHON_LIB_PATH)) {
192+
if (path.toRealPath().startsWith(PythonScriptEngineFactory.PYTHON_LIB_PATH)) {
194193
Consumer<String> localScriptDependencyListener = scriptDependencyListener;
195194
if (localScriptDependencyListener != null) {
196-
localScriptDependencyListener.accept(path.toString());
195+
localScriptDependencyListener.accept(path.toRealPath().toString());
197196
}
198197
}
199198

0 commit comments

Comments
 (0)