mirror of https://github.com/n1nj4sec/pupy.git
fix cd bug
This commit is contained in:
parent
f3fc9a5fca
commit
dc40950eb1
|
@ -79,8 +79,11 @@ def ls(path=None):
|
|||
def cd(path=None):
|
||||
if not path:
|
||||
home = os.path.expanduser("~")
|
||||
try:
|
||||
os.chdir(home)
|
||||
return
|
||||
except:
|
||||
return "[-] Home directory not found (or access denied): %s" % home
|
||||
|
||||
path = os.path.join(os.getcwd(), path)
|
||||
if os.path.isdir(path):
|
||||
|
|
Loading…
Reference in New Issue