Skip to content

Commit

Permalink
hot fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
themanyfaceddemon committed Aug 12, 2024
1 parent afd9b6e commit 44e4be4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
6 changes: 4 additions & 2 deletions DMBotNetwork/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -260,8 +260,10 @@ async def _download_file(self, server_data: dict) -> None:
if not file_name:
return

file_path: Path = self._server_file_path / self._cur_server_name / file_name
file_path.mkdir(parents=True, exist_ok=True)
dir_path = self._server_file_path / self._cur_server_name
dir_path.mkdir(parents=True, exist_ok=True)
file_path = dir_path / file_name


with open(file_path, "wb") as file:
received_size = 0
Expand Down
3 changes: 1 addition & 2 deletions DMBotNetwork/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -400,8 +400,7 @@ async def send_data_login(self, login: str, data: Any) -> None:

await self.send_data(self._connects[login], data)


async def send_data_login(self, login: str, path: Path, file_name: str) -> None:
async def send_file_login(self, login: str, path: Path, file_name: str) -> None:
if login not in self._connects:
raise ValueError("Unknown login")

Expand Down

0 comments on commit 44e4be4

Please sign in to comment.