Skip to content

Commit 407cfaa

Browse files
committed
resolve edge path and allow to walk and list from root
1 parent aebd630 commit 407cfaa

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

cterasdk/cio/edge/types.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def decode_reference(href):
3939
@staticmethod
4040
def from_server_object(server_object):
4141
return EdgeResource(
42-
EdgePath(EdgeResource.decode_reference(server_object.href)),
42+
EdgePath.from_context(EdgeResource.decode_reference(server_object.href)),
4343
server_object.getcontenttype == 'httpd/unix-directory',
4444
server_object.getcontentlength,
4545
datetime.fromisoformat(server_object.creationdate),
@@ -60,7 +60,7 @@ def resolve(path):
6060
return path.path
6161

6262
if path is None or isinstance(path, str):
63-
return EdgePath.from_context(path)
63+
return EdgePath.from_context(path or '.')
6464

6565
raise ValueError(f'Error: Could not resolve path: {path}. Type: {type(path)}')
6666

0 commit comments

Comments
 (0)