Skip to content

Commit 440ecb5

Browse files
committed
Handle lookup failures
1 parent d86df0e commit 440ecb5

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

nxc/protocols/nfs.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -658,6 +658,9 @@ def ls(self):
658658
if "resfail" in res and res["status"] == NFS3ERR_NOENT:
659659
self.logger.fail(f"Unknown path: {self.args.ls!r}")
660660
return
661+
elif "resfail" in res:
662+
self.logger.fail(f"Error on looking up path '{sub_path}': {NFSSTAT3[res['status']]}")
663+
return
661664
# If file then break and only display file
662665
if res["resok"]["obj_attributes"]["attributes"]["type"] == NF3REG:
663666
is_file = True

0 commit comments

Comments
 (0)