Skip to content

Commit

Permalink
fix: the error caused by aligo not converting when encountering spaces (
Browse files Browse the repository at this point in the history
#111)

修复aligo空格转译问题
  • Loading branch information
dahai9 authored Oct 5, 2023
1 parent cfd13d8 commit cc477aa
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions module/cloud_drive.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,11 @@ def aligo_upload_file(
+ os.path.dirname(local_file_path).replace(save_path, "")
+ "/"
).replace("\\", "/")

"""
avoid space error
"""
remote_dir = remote_dir.replace(" ", "\ ")
if not drive_config.dir_cache.get(remote_dir):
CloudDrive.aligo_mkdir(drive_config, remote_dir)
aligo_dir = drive_config.aligo.get_folder_by_path(remote_dir)
Expand Down

0 comments on commit cc477aa

Please sign in to comment.