Skip to content

Commit 23faf61

Browse files
committed
Handle relative paths in the aliases.
1 parent 2899530 commit 23faf61

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

pythonic.el

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@
9191
(if (null alias-tuple)
9292
path
9393
(f-join (cadr alias-tuple)
94-
(substring path (length (car alias-tuple)))))))
94+
(f-relative path (car alias-tuple))))))
9595

9696
(defun pythonic-unaliased-path (alias)
9797
"Get real path from ALIAS."
@@ -103,8 +103,7 @@
103103
(if (null alias-tuple)
104104
alias
105105
(f-join (car alias-tuple)
106-
(substring alias (min (length (cadr alias-tuple))
107-
(length alias)))))))
106+
(f-relative alias (cadr alias-tuple))))))
108107

109108
(defun pythonic-has-alias-p (path)
110109
"Check if given PATH has alias."

0 commit comments

Comments
 (0)