Skip to content

Commit

Permalink
oops had my rb and wb fliped
Browse files Browse the repository at this point in the history
  • Loading branch information
lunamidori5 committed Nov 16, 2024
1 parent 9e9a09c commit 561d807
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Webserver/Programs/File_manager/file_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,12 @@ def upload_to_midori_ai(data: bytes):
if go_on:
encrypted_data = encrypt_user_data(data, username, salt)

with open(encrypted_tar_file, "rb") as f:
with open(encrypted_tar_file, "xb") as f:
f.write = encrypted_data

try:
subprocess.call([f"midori-ai-uploader --type Linux --file \"{encrypted_tar_file}\" --filename \"{filename_to_upload}\""])
os.remove(encrypted_tar_file)
except Exception as error:
print(f"Midori AI Uploader failed ({str(error)}), please try again")

Expand Down

0 comments on commit 561d807

Please sign in to comment.