Merge pull request #943 from azurebluedawn/main

Possible bug fix for "Open with default app" on Windows
main
zanllp 2026-03-31 20:50:13 +08:00 committed by GitHub
commit 06e72b0059
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -993,7 +993,7 @@ def open_file_with_default_app(file_path):
if system == 'Darwin': # macOS if system == 'Darwin': # macOS
subprocess.call(['open', file_path]) subprocess.call(['open', file_path])
elif system == 'Windows': # Windows elif system == 'Windows': # Windows
subprocess.call(file_path, shell=True) os.startfile(file_path)
elif system == 'Linux': # Linux elif system == 'Linux': # Linux
subprocess.call(['xdg-open', file_path]) subprocess.call(['xdg-open', file_path])
else: else:
@ -1140,4 +1140,4 @@ def accumulate_streaming_response(resp: requests.Response) -> str:
pass pass
content_buffer += chunk_text content_buffer += chunk_text
return content_buffer.strip() return content_buffer.strip()