Skip to content

Commit

Permalink
fix: preprocess remote_path for /dir
Browse files Browse the repository at this point in the history
  • Loading branch information
hlf20010508 committed Dec 27, 2023
1 parent d2713a4 commit ddd6c56
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/handlers/dir.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async def dir_handler(event):
await event.respond(f'Directory reset to default `{Dir.path}`')
# /dir $remote_path
else:
remote_path = cmd[1]
remote_path = cmd[1].strip().strip('*')
if remote_path.startswith('/'):
Dir.set_perm_path(remote_path)
await event.respond(f'Directory set to `{Dir.path}`')
Expand All @@ -44,7 +44,7 @@ async def dir_handler(event):
elif len(cmd) == 3:
sub_cmd = cmd[1]
if sub_cmd == 'temp':
remote_path = cmd[2]
remote_path = cmd[2].strip().strip('*')
if remote_path.startswith('/'):
Dir.set_temp_path(remote_path)
await event.respond(f'Temporary directory set to `{Dir.path}`')
Expand Down

0 comments on commit ddd6c56

Please sign in to comment.