Removes trailing slash from directories inside directories

This commit is contained in:
Saptak S 2021-09-04 20:41:22 +05:30
parent e488085116
commit 6edab6877a
No known key found for this signature in database
GPG Key ID: 2D9B32E54C68A3FB

View File

@ -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)