diff --git a/cli/onionshare_cli/web/receive_mode.py b/cli/onionshare_cli/web/receive_mode.py index a12f5456..f5aae296 100644 --- a/cli/onionshare_cli/web/receive_mode.py +++ b/cli/onionshare_cli/web/receive_mode.py @@ -583,8 +583,11 @@ class ReceiveModeRequest(Request): self.web.receive_mode.uploads_in_progress.remove(history_id) # If no files were written to self.receive_mode_dir, delete it - if len(os.listdir(self.receive_mode_dir)) == 0: - os.rmdir(self.receive_mode_dir) + try: + if len(os.listdir(self.receive_mode_dir)) == 0: + os.rmdir(self.receive_mode_dir) + except Exception: + pass def file_write_func(self, filename, length): """ diff --git a/desktop/tests/test_gui_receive.py b/desktop/tests/test_gui_receive.py index 848b2f11..7d544009 100644 --- a/desktop/tests/test_gui_receive.py +++ b/desktop/tests/test_gui_receive.py @@ -54,9 +54,9 @@ class TestReceive(GuiBaseTest): for _ in range(10): date_dir = now.strftime("%Y-%m-%d") if identical_files_at_once: - time_dir = now.strftime("%H.%M.%S-1") + time_dir = now.strftime("%H%M%S-1") else: - time_dir = now.strftime("%H.%M.%S") + time_dir = now.strftime("%H%M%S") receive_mode_dir = os.path.join( tab.settings.get("receive", "data_dir"), date_dir, time_dir ) @@ -115,7 +115,6 @@ class TestReceive(GuiBaseTest): self.have_copy_url_button(tab) self.have_show_qr_code_button(tab) self.server_status_indicator_says_started(tab) - self.web_page(tab, "Select the files you want to send, then click") def run_all_receive_mode_tests(self, tab): """Upload files in receive mode and stop the share"""