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

[ASAR] fs.readdir/readdirSync with withFileTypes:true returns empty array #25349

Closed
3 tasks done
darron1217 opened this issue Sep 7, 2020 · 3 comments
Closed
3 tasks done

Comments

@darron1217
Copy link

darron1217 commented Sep 7, 2020

Preflight Checklist

  • I have read the Contributing Guidelines for this project.
  • I agree to follow the Code of Conduct that this project adheres to.
  • I have searched the issue tracker for an issue that matches the one I want to file, without success.

Issue Details

  • Electron Version:

    • v10.1.1
  • Operating System:

    • Windows 10 (2001)
  • Last Known Working Electron version:

    • None

Expected Behavior

Even when enabling asar option, fs.readdirSync(dir, { withFileTypes: true }) should return an array of files.
Because the pull request(#24062) had already merged into master

Actual Behavior

fs.readdirSync(dir, { withFileTypes: true }) returns empty array []

To Reproduce

const dir = 'dist\win-unpacked\resources\app.asar\config';
const fs = require('fs');
fs.readdirSync(dir, { withFileTypes: true }); // results []

Screenshots

Additional Information

@hatpick
Copy link

hatpick commented Oct 15, 2020

it's because archive.stats return true/false instead of actual stats

@github-actions
Copy link
Contributor

github-actions bot commented Oct 7, 2022

This issue has been automatically marked as stale. If this issue is still affecting you, please leave any comment (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the latest version of Electron or in the beta—please include it with your comment!

@github-actions github-actions bot added the stale label Oct 7, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Nov 6, 2022

This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a supported version of Electron please open a new issue and include instructions for reproducing the issue.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Nov 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants