From 6edab6877a9591a7fff7cf74607298f0d3730986 Mon Sep 17 00:00:00 2001 From: Saptak S Date: Sat, 4 Sep 2021 20:41:22 +0530 Subject: Removes trailing slash from directories inside directories --- cli/onionshare_cli/web/share_mode.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cli/onionshare_cli/web/share_mode.py b/cli/onionshare_cli/web/share_mode.py index 8ac4055e..92a4c9af 100644 --- a/cli/onionshare_cli/web/share_mode.py +++ b/cli/onionshare_cli/web/share_mode.py @@ -425,10 +425,7 @@ class ShareModeWeb(SendBaseModeWeb): # Render directory listing filenames = [] for filename in os.listdir(filesystem_path): - if os.path.isdir(os.path.join(filesystem_path, filename)): - filenames.append(filename + "/") - else: - filenames.append(filename) + filenames.append(filename) filenames.sort() return self.directory_listing(filenames, path, filesystem_path) -- cgit v1.2.3-54-g00ecf