summaryrefslogtreecommitdiff
path: root/onionshare
diff options
context:
space:
mode:
authorMicah Lee <micah@micahflee.com>2019-09-01 20:53:21 -0700
committerMicah Lee <micah@micahflee.com>2019-09-01 20:53:21 -0700
commitd7a7538686e6b24aef7bae15d90b165df0bbf84c (patch)
treefca59bc904181e821af7838e6ee9d7bb1267a4d7 /onionshare
parent70619dd142522cb6b756469b222267341b8606fb (diff)
downloadonionshare-d7a7538686e6b24aef7bae15d90b165df0bbf84c.tar.gz
onionshare-d7a7538686e6b24aef7bae15d90b165df0bbf84c.zip
Merge SendBaseModeWeb.build_file_list into SendBaseModeWeb.set_file_info function
Diffstat (limited to 'onionshare')
-rw-r--r--onionshare/web/send_base_mode.py15
1 files changed, 2 insertions, 13 deletions
diff --git a/onionshare/web/send_base_mode.py b/onionshare/web/send_base_mode.py
index 6deb38ac..6468258a 100644
--- a/onionshare/web/send_base_mode.py
+++ b/onionshare/web/send_base_mode.py
@@ -111,22 +111,11 @@ class SendBaseModeWeb:
# Re-initialize
self.init()
- # Build the file list
- self.build_file_list(filenames)
- self.set_file_info_custom(filenames, processed_size_callback)
-
- def build_file_list(self, filenames):
- """
- Build a data structure that describes the list of files that make up
- the static website.
- """
- self.common.log("BaseModeWeb", "build_file_list")
-
# Clear the list of files
self.files = {}
self.root_files = {}
- # Loop through the files
+ # Build the file list
for filename in filenames:
basename = os.path.basename(filename.rstrip('/'))
@@ -152,7 +141,7 @@ class SendBaseModeWeb:
for nested_filename in nested_filenames:
self.files[os.path.join(normalized_root, nested_filename)] = os.path.join(root, nested_filename)
- return True
+ self.set_file_info_custom(filenames, processed_size_callback)
def render_logic(self, path=''):
"""