Skip to content

Commit 0e33698

Browse files
changes made
1 parent 16b5654 commit 0e33698

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Directory Tree Generator/tree.py

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ def realname(path, root=None):
1313

1414
def ptree(startpath, depth=-1):
1515
prefix=0
16+
assert os.path.isdir(startpath),"Directory not valid"
1617
if startpath != '/':
1718
if startpath.endswith('/'): startpath=startpath[:-1]
1819
prefix=len(startpath)

0 commit comments

Comments
 (0)