Skip to content

Commit b8c9aa4

Browse files
committed
fs: path: sync with dvc.fs.path
1 parent eeffaf8 commit b8c9aa4

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

scmrepo/fs.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,8 +128,10 @@ def overlaps(self, left, right):
128128

129129
def relpath(self, path, start=None):
130130
if start is None:
131-
start = self.getcwd()
132-
return self.flavour.relpath(path, start=start)
131+
start = "."
132+
return self.flavour.relpath(
133+
self.abspath(path), start=self.abspath(start)
134+
)
133135

134136
def relparts(self, path, base):
135137
return self.parts(self.relpath(path, base))

0 commit comments

Comments
 (0)