Skip to content

[Bug]: 无法正常加载文件路径含中文的js插件 #24

@XY0797

Description

@XY0797

Describe the bug

如标题所述,被加载js插件的路径如果含中文,会导致legacy-script-engine-quickjs抛出运行时异常,导致无法加载
下面是日志

21:58:55.265 ERROR [legacy-script-engine-quickjs] Plugin not found! Check the path you input again.
21:58:55.265 ERROR [LeviLamina] C++ Exception: std::runtime_error, from <legacy-script-engine-quickjs>:
21:58:55.265 ERROR [LeviLamina] failed to load plugin eqbase64encode

To Reproduce

给BDS目录或它的父目录重命名个带中文的名字即可稳定复现

Expected behavior

正常情况下不管路径是中文还是英文,都应该正常加载js插件

Screenshots

image
image
下面是我用安全分析工具从Windows API调用分析日志里面抓取的请求,可以看到这个文件查询确实乱码了
image

Platform

Windows 11 22H2

BDS Version

1.20.51.01

LeviLamina Version

0.7.2

LegacyScriptEngine Version

0.2.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions