Skip to content

Commit 023eed9

Browse files
committed
Use posixpath for isabs check
1 parent ce242bb commit 023eed9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sphinx_needs/directives/needimport.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import json
44
import os
5+
import posixpath
56
import re
67
from collections.abc import Sequence
78
from urllib.parse import urlparse
@@ -81,7 +82,7 @@ def run(self) -> Sequence[nodes.Node]:
8182
else:
8283
logger.info(f"Importing needs from {need_import_path}")
8384

84-
if not os.path.isabs(need_import_path):
85+
if not posixpath.isabs(need_import_path):
8586
# Relative path should start from current rst file directory
8687
curr_dir = os.path.dirname(self.docname)
8788
new_need_import_path = os.path.join(

0 commit comments

Comments
 (0)