sb: Allow checking if '.' exists as a path.

This commit is contained in:
Chris Johns 2017-09-22 11:54:06 +10:00
parent 1519d11fce
commit 55f2d69e9b

View File

@ -96,7 +96,9 @@ def listdir(path):
def exists(paths):
def _exists(p):
return os.path.basename(p) in listdir(dirname(p))
if '/' not in host(p):
p = shell(join(os.getcwd(), host(p)))
return basename(p) in ['.'] + listdir(dirname(p))
if type(paths) == list:
results = []