Having removed self.spawn(other), add back Path(other).
This commit is contained in:
parent
426da9b52b
commit
d29501bae7
1 changed files with 3 additions and 0 deletions
|
@ -221,6 +221,9 @@ class Path:
|
|||
return self.relative_to(os.getcwd())
|
||||
|
||||
def relative_to(self, other, simple=False):
|
||||
if isinstance(other, str):
|
||||
other = Path(other)
|
||||
|
||||
if self == other:
|
||||
return '.'
|
||||
|
||||
|
|
Loading…
Reference in a new issue