Skip to content

Node fs cp methods are not wrapped, don't work to copy out of an ASAR archive #49012

@bendemboski

Description

@bendemboski

Preflight Checklist

Electron Version

37.2.3

What operating system(s) are you using?

Windows

Operating System Version

Windows 11 Pro

What arch are you using?

x64

Last Known Working Electron version

No response

Does the issue also appear in Chromium / Google Chrome?

No

Expected Behavior

Using the Node fs module's cp methods (cp, promises.cp, cpSync, stable as of Node 22.3.0) to copy folders out of an ASAR works correctly.

Actual Behavior

It fails with ENOENT, e.g. Error: ENOENT: no such file or directory, opendir 'C:\Users\ben\AppData\Local\MyApp\app-3.32.0-r13901\resources\app.asar\new-folder-template'.

Testcase Gist URL

https://github.com/bendemboski/electron-node-fs-cp

Additional Information

I appears the cp methods aren't wrapped is the asar fs wrappers?

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions