Skip to content

Commit 624362d

Browse files
committed
Ignore relative paths in collected DLL directories
1 parent 694e68f commit 624362d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/charonload/_finder.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,7 @@ def _run_impl(self: Self) -> None:
423423
dll_directory_list = windows_dll_directories.split(";")
424424
for d_str in dll_directory_list:
425425
d = pathlib.Path(d_str)
426-
if d.exists() and d.is_dir():
426+
if d.exists() and d.is_absolute() and d.is_dir():
427427
_windows_dll_directories_guard.add(d)
428428

429429

src/charonload/pybind11_stubgen/__main__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ def _make_importable(full_extension_path: pathlib.Path, windows_dll_directories:
1818
dll_directory_list = windows_dll_directories.split(";")
1919
for d_str in dll_directory_list:
2020
d = pathlib.Path(d_str)
21-
if d.exists() and d.is_dir():
21+
if d.exists() and d.is_absolute() and d.is_dir():
2222
# No guard required here
2323
os.add_dll_directory(d) # type: ignore[attr-defined]
2424

0 commit comments

Comments
 (0)