diff --git a/src/main.py b/src/main.py index 0938aee..9b866e9 100755 --- a/src/main.py +++ b/src/main.py @@ -73,7 +73,7 @@ def main(): subdirname + "" + "") - if os.path.dirname == ".": + if dirname == ".": f.write("\n") else: f.write("" + @@ -86,17 +86,21 @@ def main(): for filename in filenames: # File Icon - Link - Size - Time + droot = (dirname == '.' and filename) path = (dirname == '.' and filename or dirname + '/' + filename) f.write("" + "\n" + "" + - "" + - filename + "" + - get_file_size(path) + "" + get_file_modified_time(path) + "" + - "") + "" + filename + "" + + "" + get_file_size(path) + "" + + "" + get_file_modified_time(path) + "") - # File Preview - filename relative path - f.write("" + + if dirname == droot: + f.write("\n") + else: + # File Preview - filename relative path + f.write("" + + "" + "") # Join Parent Directory and File Name with extension