Skip to content

Commit c84dec1

Browse files
committed
Use os.path.dirname instead of split.
1 parent 7a1d333 commit c84dec1

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

latextools/utils/analysis.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -164,10 +164,9 @@ def tex_base_path(self, file_path):
164164
"""
165165
file_path = os.path.normpath(file_path)
166166
try:
167-
base_path = self._import_base_paths[file_path]
167+
return self._import_base_paths[file_path]
168168
except KeyError:
169-
base_path, _ = os.path.split(self._tex_root)
170-
return base_path
169+
return os.path.dirname(self._tex_root)
171170

172171
def content(self, file_name):
173172
"""

0 commit comments

Comments
 (0)