mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 15:28:34 +01:00
Added path.lstrip for / in imports (#2651)
This commit is contained in:
committed by
Ruslan Kuprieiev
parent
a0d364e78a
commit
bfc0a3596f
@@ -21,6 +21,7 @@ logger = logging.getLogger(__name__)
|
||||
@staticmethod
|
||||
def get(url, path, out=None, rev=None):
|
||||
out = resolve_output(path, out)
|
||||
path = path.lstrip("/")
|
||||
|
||||
if Stage.is_valid_filename(out):
|
||||
raise GetDVCFileError()
|
||||
|
||||
@@ -2,5 +2,6 @@ def imp(self, url, path, out=None, rev=None):
|
||||
erepo = {"url": url}
|
||||
if rev is not None:
|
||||
erepo["rev"] = rev
|
||||
path = path.lstrip("/")
|
||||
|
||||
return self.imp_url(path, out=out, erepo=erepo, locked=True)
|
||||
|
||||
Reference in New Issue
Block a user