From 855a2fd57baaa7d6e8656be12f81ab6d6f4ab5d7 Mon Sep 17 00:00:00 2001 From: gigamaster <1905497+gigamaster@users.noreply.github.com> Date: Sat, 19 Oct 2024 15:57:21 +0200 Subject: [PATCH] test --- src/main.py | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) 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