Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fs.createWriteStream with path that includes dots(.) failed in asar #26

Open
mizchi opened this issue Apr 2, 2015 · 2 comments
Open
Labels

Comments

@mizchi
Copy link

mizchi commented Apr 2, 2015

__dirname # "/Users/mizchi/<my-project-path>/Atom.app/Contents/Resources/app/versions/0.9.0.asar"

savePath = path.join __dirname, '../1.0.0.asar'
wstream = fs.createWriteStream savePath

It failed.

Error: Invalid package /Users/mizchi/<my-project-path>/Atom.app/Contents/Resources/app/versions/1.0.0.asar

but savePath = path.join __dirname, '../1-0-0-asar' succeed.

@Ashkin
Copy link

Ashkin commented Aug 16, 2016

I believe this is caused, not by the .'s in your path, but by the .asar extension.

From my tests, fs.createWriteSteam() throws an "Invalid package" error when creating a new .asar file, and a "ENOENT" error when given an existing .asar file. Simply changing the file extension to .dat will resolve it immediately, though is likely not the behavior you require.

Regardless, this hints at a deeper problem.

@Ashkin
Copy link

Ashkin commented Aug 16, 2016

Update

Here's the root cause: electron/electron#2198

@stale stale bot added the wontfix label Mar 15, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants