# HG changeset patch # User greg # Date 1495468655 14400 # Node ID dff964aa0dd5a57cd6f955b7ce92ed4a61838002 # Parent 9eabe9e58fb5b32290afa9726e1ae537644a691e Uploaded diff -r 9eabe9e58fb5 -r dff964aa0dd5 utils.py --- a/utils.py Mon May 22 11:57:28 2017 -0400 +++ b/utils.py Mon May 22 11:57:35 2017 -0400 @@ -58,7 +58,8 @@ with open(output, 'w') as fh: dir_items = sorted(os.listdir(dir)) # Directories can only contain either files or directories, but not both. - if os.path.isdir(dir_items[0]): + item_path = os.path.join(dir, dir_items[0]) + if os.path.isdir(item_path): header = 'Directories' else: header = 'Datasets'