parsing: treat locations without scheme as belonging to 'tree://'
This commit is contained in:
parent
077244e3b9
commit
6a59e740e4
3 changed files with 42 additions and 7 deletions
|
|
@ -15,12 +15,9 @@ def main(args):
|
|||
parents = item.get("parents", False)
|
||||
exist_ok = item.get("exist_ok", False)
|
||||
|
||||
if "://" not in path:
|
||||
if not path.startswith("/"):
|
||||
print("WARNING: relative path used, this is discouraged!")
|
||||
path = f"tree:///{path}"
|
||||
else:
|
||||
path = f"tree://{path}"
|
||||
if "://" not in path and not path.startswith("/"):
|
||||
print("WARNING: relative path used, this is discouraged!")
|
||||
path = f"tree:///{path}"
|
||||
|
||||
target = parsing.parse_location(path, args)
|
||||
if parents:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue