mirror of
https://github.com/Nezumi-2711/astrbot_plugin_qq_group_daily_analysis.git
synced 2026-09-22 13:38:43 +00:00
fix(image): 处理绝对路径和相对路径的文件路径转换
This commit is contained in:
@@ -328,7 +328,10 @@ class GroupDailyAnalysis(Star):
|
||||
parts = image_url.split(",", 1)
|
||||
data = base64.b64decode(parts[1]) if len(parts) == 2 else None
|
||||
elif os.path.isfile(image_url):
|
||||
image_file = os.path.abspath(image_url)
|
||||
if os.path.isabs(image_url):
|
||||
image_file = image_url
|
||||
else:
|
||||
image_file = os.path.abspath(image_url)
|
||||
data = None
|
||||
else:
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user