Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 36.4k
fs.watch filename incorrect #6163
Copy link
Copy link
Closed
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
Description
Metadata
Metadata
Assignees
Labels
duplicateIssues and PRs that are duplicates of other issues or PRs.Issues and PRs that are duplicates of other issues or PRs.fsIssues and PRs related to the fs subsystem / file system.Issues and PRs related to the fs subsystem / file system.
The file names that the
fs.watchfunction reports is different fromfs.readdirSyncwhen the file names have Chinese characters, with thefs.readdirSyncfile names being correct.Buffer.from(badFileNameFromFsWatch, 'binary').toString('utf-8')will produce the correct file name, consistent withfs.readdirSync.