Skip to content

captureScreen.js 中相对路径计算错误 #4

Description

@Jianru-Lin

platformMap['win32'] = '"../bin/nircmdc.exe" savescreenshot "' + filePathAbs + '"';
这样计算路径是相对于当前工作目录计算的。注意工作目录与可执行程序目录不一定相同,在这种情况下会导致出错。
更正建议:
platformMap['win32'] = '"' + path.resolve(__dirname, '../bin/nircmdc.exe') +'" savescreenshot "' + filePathAbs + '"';

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions